Templated 3D tensor derived from MatrixSpace adding construction from 9 components, element access using xx(), xy() etc. member functions and the inner-product (dot-product) and outer-product of two Vectors (tensor-product) operators. More...
Public Types | |
enum | components { XX , XY , XZ , YX , YY , YZ , ZX , ZY , ZZ } |
Component labeling enumeration. More... | |
typedef Tensor< label > | labelType |
Equivalent type of labels used for valid component indexing. More... | |
Public Types inherited from MatrixSpace< Tensor< Cmpt >, Cmpt, 3, 3 > | |
typedef MatrixSpace< Tensor< Cmpt >, Cmpt, Mrows, Ncols > | msType |
MatrixSpace type. More... | |
Public Types inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols > | |
typedef VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts > | vsType |
VectorSpace type. More... | |
typedef Cmpt | cmptType |
Component type. More... | |
Public Member Functions | |
Tensor () | |
Construct null. More... | |
Tensor (const Foam::zero) | |
Construct initialised to zero. More... | |
template<class Cmpt2 > | |
Tensor (const MatrixSpace< Tensor< Cmpt2 >, Cmpt2, 3, 3 > &) | |
Construct given MatrixSpace of the same rank. More... | |
template<class Cmpt2 > | |
Tensor (const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &) | |
Construct given VectorSpace of the same rank. More... | |
Tensor (const SphericalTensor< Cmpt > &) | |
Construct given SphericalTensor. More... | |
Tensor (const SymmTensor< Cmpt > &) | |
Construct given SymmTensor. More... | |
Tensor (const DiagTensor< Cmpt > &) | |
Construct given DiagTensor. More... | |
Tensor (const Vector< Vector< Cmpt >> &) | |
Construct given triad. More... | |
Tensor (const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z) | |
Construct given the three vector components. More... | |
Tensor (const Cmpt txx, const Cmpt txy, const Cmpt txz, const Cmpt tyx, const Cmpt tyy, const Cmpt tyz, const Cmpt tzx, const Cmpt tzy, const Cmpt tzz) | |
Construct given the nine components. More... | |
template<template< class, direction, direction > class Block2, direction BRowStart, direction BColStart> | |
Tensor (const Block2< Tensor< Cmpt >, BRowStart, BColStart > &block) | |
Construct from a block of another matrix space. More... | |
Tensor (Istream &) | |
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 > | x () const |
Vector< Cmpt > | y () const |
Vector< Cmpt > | z () const |
Vector< Cmpt > | vectorComponent (const direction) const |
Tensor< Cmpt > | T () const |
Return transpose. More... | |
Tensor< Cmpt > | inv () const |
Return inverse. More... | |
void | operator&= (const Tensor< Cmpt > &) |
Inner-product with a Tensor. More... | |
template<class Cmpt2 > | |
void | operator= (const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &) |
Assign to an equivalent vector space. More... | |
void | operator= (const SphericalTensor< Cmpt > &) |
Assign to a SphericalTensor. More... | |
void | operator= (const DiagTensor< Cmpt > &) |
Assign to a DiagTensor. More... | |
void | operator= (const SymmTensor< Cmpt > &) |
Assign to a SymmTensor. More... | |
void | operator= (const Vector< Vector< Cmpt >> &) |
Assign to a triad. More... | |
Public Member Functions inherited from MatrixSpace< Tensor< Cmpt >, Cmpt, 3, 3 > | |
MatrixSpace () | |
Construct null. More... | |
MatrixSpace (const Foam::zero) | |
Construct initialised to zero. More... | |
MatrixSpace (const VectorSpace< Form2, Cmpt2, Mrows *Ncols > &) | |
Construct as copy of a VectorSpace with the same size. More... | |
MatrixSpace (const Block2< Tensor< Cmpt >, BRowStart, BColStart > &block) | |
Construct from a block of another matrix space. More... | |
MatrixSpace (Istream &) | |
Construct from Istream. More... | |
const Cmpt & | elmt () const |
Fast const element access using compile-time addressing. More... | |
Cmpt & | elmt () |
Fast element access using compile-time addressing. More... | |
const Cmpt & | xx () const |
Cmpt & | xx () |
const Cmpt & | xy () const |
Cmpt & | xy () |
const Cmpt & | xz () const |
Cmpt & | xz () |
const Cmpt & | yx () const |
Cmpt & | yx () |
const Cmpt & | yy () const |
Cmpt & | yy () |
const Cmpt & | yz () const |
Cmpt & | yz () |
const Cmpt & | zx () const |
Cmpt & | zx () |
const Cmpt & | zy () const |
Cmpt & | zy () |
const Cmpt & | zz () const |
Cmpt & | zz () |
typeOfTranspose< Cmpt, Tensor< Cmpt > >::type | T () const |
Return the transpose of the matrix. More... | |
ConstBlock< SubTensor, BRowStart, BColStart > | block () const |
Return a const sub-block corresponding to the specified type. More... | |
Block< SubTensor, BRowStart, BColStart > | block () |
Return a sub-block corresponding to the specified type. More... | |
Foam::MatrixSpace< Tensor< Cmpt >, Cmpt, Mrows, Ncols >::template ConstBlock< SubTensor, BRowStart, BColStart > | block () const |
Foam::MatrixSpace< Tensor< Cmpt >, Cmpt, Mrows, Ncols >::template Block< SubTensor, BRowStart, BColStart > | block () |
const Cmpt & | operator() (const direction &i, const direction &j) const |
(i, j) const element access operator More... | |
Cmpt & | operator() (const direction &i, const direction &j) |
(i, j) element access operator More... | |
void | operator= (const Foam::zero) |
Assignment to zero. More... | |
void | operator= (const Block2< Tensor< Cmpt >, BRowStart, BColStart > &block) |
Assignment to a block of another matrix space. More... | |
void | operator&= (const MatrixSpace< Tensor< Cmpt >, Cmpt, Ncols, Ncols > &matrix) |
Inner product with a compatible square matrix. More... | |
Public Member Functions inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols > | |
VectorSpace () | |
Construct null. More... | |
VectorSpace (const Foam::zero) | |
Construct initialised to zero. More... | |
VectorSpace (Istream &) | |
Construct from Istream. More... | |
VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &) | |
Construct as copy of a VectorSpace with the same size. More... | |
const Cmpt & | component (const direction) const |
Cmpt & | component (const direction) |
void | component (Cmpt &, const direction) const |
void | replace (const direction, const Cmpt &) |
const ConstBlock< SubVector, BStart > | block () const |
const VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
const Cmpt & | operator[] (const direction) const |
Cmpt & | operator[] (const direction) |
void | operator+= (const VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts > &) |
void | operator-= (const VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts > &) |
void | operator= (const Foam::zero) |
void | operator*= (const Type) |
void | operator/= (const Type) |
Static Public Attributes | |
static const direction | rank = 2 |
Rank of Tensor is 2. More... | |
static const Tensor | I |
Static Public Attributes inherited from MatrixSpace< Tensor< Cmpt >, Cmpt, 3, 3 > | |
static const direction | mRows |
static const direction | nCols |
Static Public Attributes inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols > | |
static const direction | dim |
Dimensionality of space. More... | |
static const direction | nComponents |
Number of components in this vector space. More... | |
static const direction | mRows |
static const direction | nCols |
static const char *const | typeName |
static const char *const | componentNames [] |
static const Tensor< Cmpt > | zero |
static const Tensor< Cmpt > | one |
static const Tensor< Cmpt > | max |
static const Tensor< Cmpt > | min |
static const Tensor< Cmpt > | rootMax |
static const Tensor< Cmpt > | rootMin |
static const Tensor< Cmpt > | nan |
Additional Inherited Members | |
Static Public Member Functions inherited from MatrixSpace< Tensor< Cmpt >, Cmpt, 3, 3 > | |
static direction | m () |
Return the number of rows. More... | |
static direction | n () |
Return the number of columns. More... | |
static msType | identityMap () |
Return the identity matrix for square matrix spaces. More... | |
Static Public Member Functions inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols > | |
static direction | size () |
Return the number of elements in the VectorSpace = Ncmpts. More... | |
static Tensor< Cmpt > | uniform (const Cmpt &s) |
Return a VectorSpace with all elements = s. More... | |
Public Attributes inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols > | |
Cmpt | v_ [Ncmpts] |
The components of this vector space. More... | |
Templated 3D tensor derived from MatrixSpace adding construction from 9 components, element access using xx(), xy() etc. member functions and the inner-product (dot-product) and outer-product of two Vectors (tensor-product) operators.
enum components |
|
inline |
|
inline |
Construct given MatrixSpace of the same rank.
|
inline |
Construct given VectorSpace of the same rank.
|
inline |
Construct given SphericalTensor.
Definition at line 66 of file TensorI.H.
References SphericalTensor< Cmpt >::ii().
|
inline |
Construct given SymmTensor.
Definition at line 75 of file TensorI.H.
References SymmTensor< Cmpt >::xx(), SymmTensor< Cmpt >::xy(), SymmTensor< Cmpt >::xz(), SymmTensor< Cmpt >::yy(), SymmTensor< Cmpt >::yz(), and SymmTensor< Cmpt >::zz().
|
inline |
Construct given DiagTensor.
Definition at line 84 of file TensorI.H.
References DiagTensor< Cmpt >::xx(), DiagTensor< Cmpt >::yy(), and DiagTensor< Cmpt >::zz().
Construct given triad.
Definition at line 93 of file TensorI.H.
References Foam::tr().
|
inline |
|
inline |
Definition at line 163 of file TensorI.H.
Referenced by Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::tr(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 170 of file TensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator*(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::skew(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 177 of file TensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator*(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::skew(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 184 of file TensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::skew(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 191 of file TensorI.H.
Referenced by Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::tr(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 198 of file TensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator*(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::skew(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 205 of file TensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::skew(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 212 of file TensorI.H.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::skew(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 219 of file TensorI.H.
Referenced by Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::eigenValues(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Tensor< Cmpt >::operator&=(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Foam::tr(), Foam::transform(), coordinateRotation::transformVectorDiagTensor(), and Foam::twoSymm().
|
inline |
Definition at line 289 of file TensorI.H.
Referenced by axesRotation::e1(), EulerCoordinateRotation::e1(), STARCDCoordinateRotation::e1(), triad::operator=(), triad::triad(), and waveSuperposition::UGas().
|
inline |
Definition at line 296 of file TensorI.H.
Referenced by axesRotation::e2(), EulerCoordinateRotation::e2(), STARCDCoordinateRotation::e2(), triad::operator=(), triad::triad(), and waveSuperposition::UGas().
|
inline |
Definition at line 303 of file TensorI.H.
Referenced by axesRotation::e3(), EulerCoordinateRotation::e3(), STARCDCoordinateRotation::e3(), triad::operator=(), triad::triad(), and waveSuperposition::UGas().
|
inline |
|
inline |
Return transpose.
Definition at line 331 of file TensorI.H.
Referenced by triangle< Point, PointRef >::inertia(), spatialTransform::inv(), Foam::RBD::transform(), and triad::triad().
|
inline |
Return inverse.
Definition at line 661 of file TensorI.H.
References Foam::inv().
Inner-product with a Tensor.
Definition at line 345 of file TensorI.H.
References Tensor< Cmpt >::xx(), Tensor< Cmpt >::xy(), Tensor< Cmpt >::xz(), Tensor< Cmpt >::yx(), Tensor< Cmpt >::yy(), Tensor< Cmpt >::yz(), Tensor< Cmpt >::zx(), Tensor< Cmpt >::zy(), and Tensor< Cmpt >::zz().
|
inline |
|
inline |
Assign to a SphericalTensor.
Definition at line 379 of file TensorI.H.
References SphericalTensor< Cmpt >::ii().
|
inline |
Assign to a DiagTensor.
Definition at line 388 of file TensorI.H.
References DiagTensor< Cmpt >::xx(), DiagTensor< Cmpt >::yy(), and DiagTensor< Cmpt >::zz().
|
inline |
Assign to a SymmTensor.
Definition at line 397 of file TensorI.H.
References SymmTensor< Cmpt >::xx(), SymmTensor< Cmpt >::xy(), SymmTensor< Cmpt >::xz(), SymmTensor< Cmpt >::yy(), SymmTensor< Cmpt >::yz(), and SymmTensor< Cmpt >::zz().
Assign to a triad.
Definition at line 406 of file TensorI.H.
References Foam::tr().
|
static |