A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 3 elements, derived from VectorSpace. More...


Public Types | |
| enum | components { XX, YY, ZZ } |
| Component labeling enumeration. More... | |
| typedef DiagTensor< label > | labelType |
| Equivalent type of labels used for valid component indexing. More... | |
Public Types inherited from VectorSpace< DiagTensor< Cmpt >, Cmpt, 3 > | |
| typedef VectorSpace< DiagTensor< Cmpt >, Cmpt, Ncmpts > | vsType |
| VectorSpace type. More... | |
| typedef Cmpt | cmptType |
| Component type. More... | |
| typedef Cmpt | magType |
| Magnitude type. More... | |
| typedef direction | size_type |
| The type to represent the size of a VectorSpace. More... | |
| typedef Cmpt * | iterator |
| Random access iterator for traversing VectorSpace. More... | |
| typedef const Cmpt * | const_iterator |
| Random access iterator for traversing VectorSpace. More... | |
Public Member Functions | |
| DiagTensor ()=default | |
| Default construct. More... | |
| DiagTensor (const DiagTensor &)=default | |
| Copy construct. More... | |
| DiagTensor & | operator= (const DiagTensor &)=default |
| Copy assignment. More... | |
| DiagTensor (Foam::zero) | |
| Construct initialized to zero. More... | |
| template<class Cmpt2 > | |
| DiagTensor (const VectorSpace< DiagTensor< Cmpt2 >, Cmpt2, 3 > &) | |
| Construct given VectorSpace. More... | |
| DiagTensor (const SphericalTensor< Cmpt > &) | |
| Construct given SphericalTensor. More... | |
| DiagTensor (const Cmpt &txx, const Cmpt &tyy, const Cmpt &tzz) | |
| Construct given three components. More... | |
| DiagTensor (Istream &is) | |
| Construct from Istream. More... | |
| const Cmpt & | xx () const noexcept |
| const Cmpt & | yy () const noexcept |
| const Cmpt & | zz () const noexcept |
| Cmpt & | xx () noexcept |
| Cmpt & | yy () noexcept |
| Cmpt & | zz () noexcept |
| Vector< Cmpt > | diag () const |
| Extract the diagonal as a vector. More... | |
| scalar | diagSqr () const |
| The L2-norm squared of the diagonal. More... | |
Public Member Functions inherited from VectorSpace< DiagTensor< Cmpt >, Cmpt, 3 > | |
| VectorSpace ()=default | |
| Default construct. More... | |
| VectorSpace (const VectorSpace &)=default | |
| Copy construct. More... | |
| VectorSpace (VectorSpace &&)=default | |
| Move construct. More... | |
| VectorSpace (Foam::zero) | |
| Construct initialized to zero. More... | |
| VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &) | |
| Copy construct of a VectorSpace with the same size. More... | |
| VectorSpace (Istream &is) | |
| Construct from Istream. More... | |
| const Cmpt & | component (const direction) const |
| Cmpt & | component (const direction) |
| void | component (Cmpt &, const direction) const |
| void | replace (const direction, const Cmpt &) |
| const Cmpt * | cdata () const noexcept |
| Return const pointer to the first data element. More... | |
| Cmpt * | data () noexcept |
| Return pointer to the first data element. More... | |
| void | fill (const Cmpt &s) |
| Assign all components to given value. More... | |
| const ConstBlock< SubVector, BStart > | block () const |
| const Foam::VectorSpace< DiagTensor< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
| const Cmpt & | operator[] (const direction) const |
| Cmpt & | operator[] (const direction) |
| VectorSpace & | operator= (const VectorSpace &)=default |
| Copy assignment. More... | |
| VectorSpace & | operator= (VectorSpace &&)=default |
| Move assignment. More... | |
| void | operator= (const VectorSpace< Form2, Cmpt2, Ncmpts > &) |
| Copy assign from a VectorSpace with the same size. More... | |
| void | operator= (Foam::zero) |
| void | operator+= (const VectorSpace< DiagTensor< Cmpt >, Cmpt, Ncmpts > &) |
| void | operator-= (const VectorSpace< DiagTensor< Cmpt >, Cmpt, Ncmpts > &) |
| void | operator*= (const scalar) |
| void | operator/= (const scalar) |
| iterator | begin () noexcept |
| Return an iterator (pointer) to begin of VectorSpace. More... | |
| const_iterator | begin () const noexcept |
| Return const_iterator (const pointer) to begin of VectorSpace. More... | |
| const_iterator | cbegin () const noexcept |
| Return const_iterator (const pointer) to begin of VectorSpace. More... | |
| iterator | end () noexcept |
| Return an iterator (pointer) to end of VectorSpace. More... | |
| const_iterator | end () const noexcept |
| Return const_iterator (const pointer) to end of VectorSpace. More... | |
| const_iterator | cend () const noexcept |
| Return const_iterator (const pointer) to end of VectorSpace. More... | |
Static Public Attributes | |
| static constexpr direction | rank = 2 |
| Rank of DiagTensor is 2. More... | |
Static Public Attributes inherited from VectorSpace< DiagTensor< Cmpt >, Cmpt, 3 > | |
| static constexpr direction | dim |
| Dimensionality of space. More... | |
| static constexpr direction | nComponents |
| Number of components in this vector space. More... | |
| static constexpr direction | mRows |
| static constexpr direction | nCols |
| static const char *const | typeName |
| static const char *const | componentNames [] |
| static const DiagTensor< Cmpt > | zero |
| static const DiagTensor< Cmpt > | one |
| static const DiagTensor< Cmpt > | max |
| static const DiagTensor< Cmpt > | min |
| static const DiagTensor< Cmpt > | rootMax |
| static const DiagTensor< Cmpt > | rootMin |
Additional Inherited Members | |
Static Public Member Functions inherited from VectorSpace< DiagTensor< Cmpt >, Cmpt, 3 > | |
| static constexpr direction | size () noexcept |
| The number of elements in the VectorSpace = Ncmpts. More... | |
| static DiagTensor< Cmpt > | uniform (const Cmpt &s) |
| Return a VectorSpace with all elements = s. More... | |
Public Attributes inherited from VectorSpace< DiagTensor< Cmpt >, Cmpt, 3 > | |
| Cmpt | v_ [Ncmpts] |
| The components of this vector space. More... | |
A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 3 elements, derived from VectorSpace.
Definition at line 53 of file DiagTensor.H.
| typedef DiagTensor<label> labelType |
Equivalent type of labels used for valid component indexing.
Definition at line 64 of file DiagTensor.H.
| enum components |
|
default |
Default construct.
|
default |
Copy construct.
|
inline |
Construct initialized to zero.
Definition at line 28 of file DiagTensorI.H.
|
inline |
Construct given VectorSpace.
Definition at line 37 of file DiagTensorI.H.
|
inline |
Construct given SphericalTensor.
Definition at line 46 of file DiagTensorI.H.
|
inline |
Construct given three components.
Definition at line 56 of file DiagTensorI.H.
|
inlineexplicit |
Construct from Istream.
Definition at line 69 of file DiagTensorI.H.
|
default |
Copy assignment.
|
inlinenoexcept |
Definition at line 132 of file DiagTensor.H.
Referenced by Foam::det(), Foam::inv(), Foam::lerp(), Foam::operator &(), Foam::operator+(), Foam::operator-(), Foam::operator/(), and Foam::tr().

|
inlinenoexcept |
Definition at line 133 of file DiagTensor.H.
Referenced by molecule::constantProperties::constantProperties(), Foam::det(), Foam::inv(), Foam::lerp(), Foam::operator &(), Foam::operator+(), Foam::operator-(), Foam::operator/(), and Foam::tr().

|
inlinenoexcept |
Definition at line 134 of file DiagTensor.H.
Referenced by molecule::constantProperties::constantProperties(), Foam::det(), Foam::inv(), Foam::lerp(), Foam::operator &(), Foam::operator+(), Foam::operator-(), Foam::operator/(), and Foam::tr().

|
inlinenoexcept |
Definition at line 136 of file DiagTensor.H.
|
inlinenoexcept |
Definition at line 137 of file DiagTensor.H.
|
inlinenoexcept |
Definition at line 138 of file DiagTensor.H.
|
inline |
Extract the diagonal as a vector.
Definition at line 78 of file DiagTensorI.H.
|
inline |
The L2-norm squared of the diagonal.
Definition at line 85 of file DiagTensorI.H.
Referenced by Foam::magSqr().

|
static |
Rank of DiagTensor is 2.
Definition at line 72 of file DiagTensor.H.