Templated 3D tensor derived from VectorSpace 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 | { rank = 2 } |
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... | |
![]() | |
enum | |
typedef Cmpt | cmptType |
Component type. More... | |
Public Member Functions | |
Tensor () | |
Construct null. 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 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... | |
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 |
Transpose. More... | |
void | operator= (const SphericalTensor< Cmpt > &) |
Assign to a SphericalTensor. More... | |
void | operator= (const SymmTensor< Cmpt > &) |
Assign to a SymmTensor. More... | |
void | operator= (const Vector< Vector< Cmpt > > &) |
Assign to a triad. More... | |
![]() | |
VectorSpace () | |
Construct null. More... | |
VectorSpace (Istream &) | |
Construct from Istream. More... | |
VectorSpace (const VectorSpace< Tensor< Cmpt >, Cmpt, nCmpt > &) | |
Construct as copy. More... | |
VectorSpace (const VectorSpace< Form2, Cmpt2, nCmpt > &) | |
Construct as copy of another VectorSpace type of the same rank. More... | |
label | size () const |
Return the number of elements in the VectorSpace = nCmpt. 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 & | operator[] (const direction) const |
Cmpt & | operator[] (const direction) |
void | operator= (const VectorSpace< Tensor< Cmpt >, Cmpt, nCmpt > &) |
void | operator+= (const VectorSpace< Tensor< Cmpt >, Cmpt, nCmpt > &) |
void | operator-= (const VectorSpace< Tensor< Cmpt >, Cmpt, nCmpt > &) |
void | operator*= (const scalar) |
void | operator/= (const scalar) |
Static Public Attributes | |
static const char *const | typeName = "labelTensor" |
static const char * | componentNames [] |
static const Tensor | zero |
static const Tensor | one |
static const Tensor | max |
static const Tensor | min |
static const Tensor | I |
Additional Inherited Members | |
![]() | |
Cmpt | v_ [nCmpt] |
The components of this vector space. More... | |
Templated 3D tensor derived from VectorSpace 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.
Definition at line 224 of file complexI.H.
enum components |
|
inline |
Construct null.
Definition at line 36 of file TensorI.H.
Referenced by Tensor< Cmpt >::Tensor().
|
inline |
Construct given VectorSpace of the same rank.
|
inline |
Construct given SphericalTensor.
Definition at line 49 of file TensorI.H.
References SphericalTensor< Cmpt >::ii(), VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, 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 |
Construct given SymmTensor.
Definition at line 58 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, Tensor< Cmpt >::XX, SymmTensor< Cmpt >::xx(), Tensor< Cmpt >::XY, SymmTensor< Cmpt >::xy(), Tensor< Cmpt >::XZ, SymmTensor< Cmpt >::xz(), Tensor< Cmpt >::YX, Tensor< Cmpt >::YY, SymmTensor< Cmpt >::yy(), Tensor< Cmpt >::YZ, SymmTensor< Cmpt >::yz(), Tensor< Cmpt >::ZX, Tensor< Cmpt >::ZY, Tensor< Cmpt >::ZZ, and SymmTensor< Cmpt >::zz().
Construct given triad.
Definition at line 67 of file TensorI.H.
References Tensor< Cmpt >::Tensor(), Foam::tr(), VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, 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.
Construct given the three vector components.
Definition at line 85 of file TensorI.H.
References Tensor< Cmpt >::Tensor(), VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, Vector< Cmpt >::x(), Tensor< Cmpt >::XX, Tensor< Cmpt >::XY, Tensor< Cmpt >::XZ, Vector< Cmpt >::y(), Tensor< Cmpt >::YX, Tensor< Cmpt >::YY, Tensor< Cmpt >::YZ, Vector< Cmpt >::z(), Tensor< Cmpt >::ZX, Tensor< Cmpt >::ZY, and Tensor< Cmpt >::ZZ.
|
inline |
Construct given the nine components.
Definition at line 99 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, 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 |
Definition at line 160 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XX.
Referenced by globalIndexAndTransform::addToTransformIndex(), fixedCoeff::calcTranformModelData(), DarcyForchheimer::calcTranformModelData(), Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::tr(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 167 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XY.
Referenced by Foam::cof(), ReynoldsStress< BasicTurbulenceModel >::correctWallShearStress(), Foam::det(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator*(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), Foam::skew(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 174 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XZ.
Referenced by Foam::cof(), ReynoldsStress< BasicTurbulenceModel >::correctWallShearStress(), Foam::det(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator*(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), Foam::skew(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 181 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YX.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), Foam::skew(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 188 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YY.
Referenced by globalIndexAndTransform::addToTransformIndex(), Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::tr(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 195 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YZ.
Referenced by Foam::cof(), ReynoldsStress< BasicTurbulenceModel >::correctWallShearStress(), Foam::det(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator*(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), Foam::skew(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 202 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZX.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), Foam::skew(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 209 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZY.
Referenced by Foam::cof(), Foam::det(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), Foam::skew(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 216 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZZ.
Referenced by globalIndexAndTransform::addToTransformIndex(), Foam::cof(), molecule::constantProperties::constantProperties(), Foam::det(), Foam::diag(), Foam::eigenValues(), Foam::eigenVector(), Foam::inv(), Foam::invariantII(), momentOfInertia::massPropertiesSolid(), Foam::operator&(), Foam::operator&&(), Foam::operator+(), Foam::operator-(), quaternion::quaternion(), Foam::readUpto(), triad::sortxyz(), Foam::symm(), Tensor< Cmpt >::T(), Foam::tr(), Foam::transform(), coordinateRotation::transformPrincipal(), Foam::twoSymm(), and dxSurfaceWriter::writeData().
|
inline |
Definition at line 223 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XX.
|
inline |
Definition at line 230 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XY.
|
inline |
Definition at line 237 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XZ.
|
inline |
Definition at line 244 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YX.
|
inline |
Definition at line 251 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YY.
|
inline |
Definition at line 258 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YZ.
|
inline |
Definition at line 265 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZX.
|
inline |
Definition at line 272 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZY.
|
inline |
Definition at line 279 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZZ.
|
inline |
Definition at line 121 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, Tensor< Cmpt >::XX, Tensor< Cmpt >::XY, and Tensor< Cmpt >::XZ.
Referenced by molecule::constantProperties::constantProperties(), STARCDCoordinateRotation::e1(), EulerCoordinateRotation::e1(), axesRotation::e1(), triad::operator=(), triad::triad(), and Tensor< Cmpt >::vectorComponent().
|
inline |
Definition at line 128 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, Tensor< Cmpt >::YX, Tensor< Cmpt >::YY, and Tensor< Cmpt >::YZ.
Referenced by molecule::constantProperties::constantProperties(), STARCDCoordinateRotation::e2(), EulerCoordinateRotation::e2(), axesRotation::e2(), triad::operator=(), triad::triad(), and Tensor< Cmpt >::vectorComponent().
|
inline |
Definition at line 135 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, Tensor< Cmpt >::ZX, Tensor< Cmpt >::ZY, and Tensor< Cmpt >::ZZ.
Referenced by molecule::constantProperties::constantProperties(), STARCDCoordinateRotation::e3(), EulerCoordinateRotation::e3(), axesRotation::e3(), triad::operator=(), triad::triad(), and Tensor< Cmpt >::vectorComponent().
Definition at line 142 of file TensorI.H.
References Tensor< Cmpt >::x(), Tensor< Cmpt >::y(), and Tensor< Cmpt >::z().
|
inline |
Transpose.
Definition at line 286 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().
Referenced by cyclicAMIPolyPatch::calcTransforms(), cyclicPolyPatch::calcTransforms(), Foam::inv(), vectorTensorTransform::invTransformPosition(), molecule::move(), mapDistribute::transform::operator()(), transformOp< PrimitivePatchType, Type, TrackingData >::operator()(), sixDoFRigidBodyMotion::transform(), and triad::triad().
|
inline |
Assign to a SphericalTensor.
Definition at line 300 of file TensorI.H.
References SphericalTensor< Cmpt >::ii(), VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, 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 |
Assign to a SymmTensor.
Definition at line 309 of file TensorI.H.
References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, Tensor< Cmpt >::XX, SymmTensor< Cmpt >::xx(), Tensor< Cmpt >::XY, SymmTensor< Cmpt >::xy(), Tensor< Cmpt >::XZ, SymmTensor< Cmpt >::xz(), Tensor< Cmpt >::YX, Tensor< Cmpt >::YY, SymmTensor< Cmpt >::yy(), Tensor< Cmpt >::YZ, SymmTensor< Cmpt >::yz(), Tensor< Cmpt >::ZX, Tensor< Cmpt >::ZY, Tensor< Cmpt >::ZZ, and SymmTensor< Cmpt >::zz().
Assign to a triad.
Definition at line 318 of file TensorI.H.
References Foam::tr(), VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, 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.
|
static |
|
static |
|
static |