pub trait Rank2{
type Transpose;
// Required methods
fn deviatoric(&self) -> Self;
fn deviatoric_and_trace(&self) -> (Self, Quantity<Self::Unit>);
fn is_diagonal(&self) -> bool;
fn is_identity(&self) -> bool;
fn is_symmetric(&self) -> bool;
fn squared_trace(&self) -> Quantity<Square<Self::Unit>>
where Self::Unit: UnitMul<Self::Unit>;
fn trace(&self) -> Quantity<Self::Unit>;
fn transpose(&self) -> Self::Transpose;
// Provided method
fn second_invariant(&self) -> Quantity<Square<Self::Unit>>
where Self::Unit: UnitMul<Self::Unit> { ... }
}Expand description
Common methods for rank-2 tensors.
Required Associated Types§
Required Methods§
Sourcefn deviatoric(&self) -> Self
fn deviatoric(&self) -> Self
Returns the deviatoric component of the rank-2 tensor.
Sourcefn deviatoric_and_trace(&self) -> (Self, Quantity<Self::Unit>)
fn deviatoric_and_trace(&self) -> (Self, Quantity<Self::Unit>)
Returns the deviatoric component and trace of the rank-2 tensor.
Sourcefn is_diagonal(&self) -> bool
fn is_diagonal(&self) -> bool
Checks whether the tensor is a diagonal tensor.
Sourcefn is_identity(&self) -> bool
fn is_identity(&self) -> bool
Checks whether the tensor is the identity tensor.
Sourcefn is_symmetric(&self) -> bool
fn is_symmetric(&self) -> bool
Checks whether the tensor is a symmetric tensor.
Sourcefn squared_trace(&self) -> Quantity<Square<Self::Unit>>
fn squared_trace(&self) -> Quantity<Square<Self::Unit>>
Returns the trace of the rank-2 tensor squared.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".