A templated (3 x 3) symmetric tensor of objects of <T>, effectively containing 6 elements, derived from VectorSpace. More...
Public Types | |
enum | components { XX, XY, XZ, YY, YZ, ZZ } |
Component labeling enumeration. More... | |
typedef SymmTensor< label > | labelType |
Equivalent type of labels used for valid component indexing. More... | |
![]() | |
typedef VectorSpace< SymmTensor< Cmpt >, Cmpt, Ncmpts > | vsType |
VectorSpace type. More... | |
typedef Cmpt | cmptType |
Component type. More... | |
typedef Cmpt | magType |
Magnitude type. More... | |
typedef Cmpt * | iterator |
Random access iterator for traversing VectorSpace. More... | |
Public Member Functions | |
SymmTensor ()=default | |
Default construct. More... | |
SymmTensor (const SymmTensor &)=default | |
Copy construct. More... | |
SymmTensor & | operator= (const SymmTensor &)=default |
Copy assignment. More... | |
SymmTensor (const Foam::zero) | |
Construct initialized to zero. More... | |
template<class Cmpt2 > | |
SymmTensor (const VectorSpace< SymmTensor< Cmpt2 >, Cmpt2, 6 > &) | |
Construct given VectorSpace of the same rank. More... | |
SymmTensor (const SphericalTensor< Cmpt > &) | |
Construct given SphericalTensor. More... | |
SymmTensor (const Cmpt txx, const Cmpt txy, const Cmpt txz, const Cmpt tyy, const Cmpt tyz, const Cmpt tzz) | |
Construct given the six components. More... | |
SymmTensor (Istream &is) | |
Construct from Istream. More... | |
const Cmpt & | xx () const |
const Cmpt & | xy () const |
const Cmpt & | xz () const |
const Cmpt & | yx () const |
const Cmpt & | yy () const |
const Cmpt & | yz () const |
const Cmpt & | zx () const |
const Cmpt & | zy () const |
const Cmpt & | zz () const |
Cmpt & | xx () |
Cmpt & | xy () |
Cmpt & | xz () |
Cmpt & | yx () |
Cmpt & | yy () |
Cmpt & | yz () |
Cmpt & | zx () |
Cmpt & | zy () |
Cmpt & | zz () |
Vector< Cmpt > | diag () const |
Extract the diagonal as a vector. More... | |
void | diag (const Vector< Cmpt > &v) |
Set values of the diagonal. More... | |
const SymmTensor< Cmpt > & | T () const |
Return non-Hermitian transpose. More... | |
void | operator= (const SphericalTensor< Cmpt > &) |
Assign to given SphericalTensor. More... | |
![]() | |
VectorSpace ()=default | |
Default construct. More... | |
VectorSpace (const Foam::zero) | |
Construct initialized to zero. More... | |
VectorSpace (const VectorSpace< SymmTensor< Cmpt >, Cmpt, Ncmpts > &vs) | |
Copy construct. 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... | |
const ConstBlock< SubVector, BStart > | block () const |
const Foam::VectorSpace< SymmTensor< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
const Cmpt & | operator[] (const direction) const |
Cmpt & | operator[] (const direction) |
void | operator= (const VectorSpace< SymmTensor< Cmpt >, Cmpt, Ncmpts > &) |
void | operator= (const Foam::zero) |
void | operator+= (const VectorSpace< SymmTensor< Cmpt >, Cmpt, Ncmpts > &) |
void | operator-= (const VectorSpace< SymmTensor< Cmpt >, Cmpt, Ncmpts > &) |
void | operator*= (const scalar) |
void | operator/= (const scalar) |
iterator | begin () noexcept |
Return an iterator to begin of VectorSpace. More... | |
const_iterator | begin () const noexcept |
Return const_iterator to begin of VectorSpace. More... | |
iterator | end () noexcept |
Return an iterator to end of VectorSpace. More... | |
const_iterator | end () const noexcept |
Return const_iterator to end of VectorSpace. More... | |
const_iterator | cbegin () const noexcept |
Return const_iterator to begin of VectorSpace. More... | |
const_iterator | cend () const noexcept |
Return const_iterator to end of VectorSpace. More... | |
Static Public Attributes | |
static constexpr direction | rank = 2 |
Rank of SymmTensor is 2. More... | |
static const SymmTensor | I |
![]() | |
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 SymmTensor< Cmpt > | zero |
static const SymmTensor< Cmpt > | one |
static const SymmTensor< Cmpt > | max |
static const SymmTensor< Cmpt > | min |
static const SymmTensor< Cmpt > | rootMax |
static const SymmTensor< Cmpt > | rootMin |
Additional Inherited Members | |
![]() | |
static constexpr direction | size () noexcept |
The number of elements in the VectorSpace = Ncmpts. More... | |
static SymmTensor< Cmpt > | uniform (const Cmpt &s) |
Return a VectorSpace with all elements = s. More... | |
![]() | |
const typedef Cmpt * | const_iterator |
Random access iterator for traversing VectorSpace. More... | |
Cmpt | v_ [Ncmpts] |
The components of this vector space. More... | |
A templated (3 x 3) symmetric tensor of objects of <T>, effectively containing 6 elements, derived from VectorSpace.
Definition at line 58 of file SymmTensor.H.
typedef SymmTensor<label> labelType |
Equivalent type of labels used for valid component indexing.
Definition at line 67 of file SymmTensor.H.
enum components |
Component labeling enumeration.
Enumerator | |
---|---|
XX | |
XY | |
XZ | |
YY | |
YZ | |
ZZ |
Definition at line 82 of file SymmTensor.H.
|
default |
Default construct.
|
default |
Copy construct.
|
inline |
Construct initialized to zero.
Definition at line 34 of file SymmTensorI.H.
|
inline |
Construct given VectorSpace of the same rank.
Definition at line 43 of file SymmTensorI.H.
|
inline |
Construct given SphericalTensor.
Definition at line 52 of file SymmTensorI.H.
|
inline |
Construct given the six components.
Definition at line 62 of file SymmTensorI.H.
|
inlineexplicit |
Construct from Istream.
Definition at line 75 of file SymmTensorI.H.
|
default |
Copy assignment.
|
inline |
Definition at line 84 of file SymmTensorI.H.
Referenced by primitiveMeshTools::cellDeterminant(), Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::innerSqr(), Foam::invariantII(), Foam::invTransform(), Foam::magSqr(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), Foam::operator/(), Tensor< scalar >::operator=(), Tensor< scalar >::Tensor(), Foam::tr(), and Foam::transform().
|
inline |
Definition at line 90 of file SymmTensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::innerSqr(), Foam::invariantII(), Foam::invTransform(), Foam::magSqr(), Foam::operator&(), Foam::operator&&(), Foam::operator*(), Foam::operator+(), Foam::operator-(), Foam::operator/(), Tensor< scalar >::operator=(), Tensor< scalar >::Tensor(), and Foam::transform().
|
inline |
Definition at line 96 of file SymmTensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::innerSqr(), Foam::invariantII(), Foam::invTransform(), Foam::magSqr(), Foam::operator&(), Foam::operator&&(), Foam::operator*(), Foam::operator+(), Foam::operator-(), Foam::operator/(), Tensor< scalar >::operator=(), Tensor< scalar >::Tensor(), and Foam::transform().
|
inline |
Definition at line 102 of file SymmTensorI.H.
|
inline |
Definition at line 108 of file SymmTensorI.H.
Referenced by primitiveMeshTools::cellDeterminant(), Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::innerSqr(), Foam::invariantII(), Foam::invTransform(), Foam::magSqr(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), Foam::operator/(), Tensor< scalar >::operator=(), Tensor< scalar >::Tensor(), Foam::tr(), and Foam::transform().
|
inline |
Definition at line 114 of file SymmTensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::innerSqr(), Foam::invariantII(), Foam::invTransform(), Foam::magSqr(), Foam::operator&(), Foam::operator&&(), Foam::operator*(), Foam::operator+(), Foam::operator-(), Foam::operator/(), Tensor< scalar >::operator=(), Tensor< scalar >::Tensor(), and Foam::transform().
|
inline |
Definition at line 120 of file SymmTensorI.H.
|
inline |
Definition at line 126 of file SymmTensorI.H.
|
inline |
Definition at line 132 of file SymmTensorI.H.
Referenced by primitiveMeshTools::cellDeterminant(), Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::innerSqr(), Foam::invariantII(), Foam::invTransform(), Foam::magSqr(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), Foam::operator/(), Tensor< scalar >::operator=(), Tensor< scalar >::Tensor(), Foam::tr(), and Foam::transform().
|
inline |
Definition at line 139 of file SymmTensorI.H.
|
inline |
Definition at line 145 of file SymmTensorI.H.
|
inline |
Definition at line 151 of file SymmTensorI.H.
|
inline |
Definition at line 157 of file SymmTensorI.H.
|
inline |
Definition at line 163 of file SymmTensorI.H.
|
inline |
Definition at line 169 of file SymmTensorI.H.
|
inline |
Definition at line 175 of file SymmTensorI.H.
|
inline |
Definition at line 181 of file SymmTensorI.H.
|
inline |
Definition at line 187 of file SymmTensorI.H.
|
inline |
Extract the diagonal as a vector.
Definition at line 194 of file SymmTensorI.H.
|
inline |
Set values of the diagonal.
Definition at line 201 of file SymmTensorI.H.
|
inline |
Return non-Hermitian transpose.
Definition at line 208 of file SymmTensorI.H.
|
inline |
Assign to given SphericalTensor.
Definition at line 217 of file SymmTensorI.H.
|
staticconstexpr |
Rank of SymmTensor is 2.
Definition at line 73 of file SymmTensor.H.
|
static |
Definition at line 78 of file SymmTensor.H.