Skip to main content

Rank2

Trait Rank2 

Source
pub trait Rank2
where Self: Sized + Tensor,
{ 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§

Source

type Transpose

The type that is the transpose of the tensor.

Required Methods§

Source

fn deviatoric(&self) -> Self

Returns the deviatoric component of the rank-2 tensor.

Source

fn deviatoric_and_trace(&self) -> (Self, Quantity<Self::Unit>)

Returns the deviatoric component and trace of the rank-2 tensor.

Source

fn is_diagonal(&self) -> bool

Checks whether the tensor is a diagonal tensor.

Source

fn is_identity(&self) -> bool

Checks whether the tensor is the identity tensor.

Source

fn is_symmetric(&self) -> bool

Checks whether the tensor is a symmetric tensor.

Source

fn squared_trace(&self) -> Quantity<Square<Self::Unit>>
where Self::Unit: UnitMul<Self::Unit>,

Returns the trace of the rank-2 tensor squared.

Source

fn trace(&self) -> Quantity<Self::Unit>

Returns the trace of the rank-2 tensor, which carries its unit.

Source

fn transpose(&self) -> Self::Transpose

Returns the transpose of the rank-2 tensor.

Provided Methods§

Source

fn second_invariant(&self) -> Quantity<Square<Self::Unit>>
where Self::Unit: UnitMul<Self::Unit>,

Returns the second invariant of the rank-2 tensor.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Rank2 for SquareMatrix

Source§

impl<const D: usize, I, J, U> Rank2 for TensorRank2<D, I, J, U>

Source§

type Transpose = TensorRank2<D, J, I, U>