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 scalar) |
void | operator/= (const scalar) |
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 |
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 | identity () |
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.
Definition at line 215 of file complexI.H.
enum components |
|
inline |
Construct null.
Definition at line 32 of file TensorI.H.
Referenced by Tensor< scalar >::Tensor().
|
inline |
|
inline |
Construct given MatrixSpace of the same rank.
|
inline |
Construct given VectorSpace of the same rank.
|
inline |
Construct given SphericalTensor.
|
inline |
Construct given SymmTensor.
|
inline |
Construct given DiagTensor.
|
inline |
|
inline |
Definition at line 163 of file TensorI.H.
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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::tr(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 170 of file TensorI.H.
Referenced by Foam::cof(), 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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 177 of file TensorI.H.
Referenced by Foam::cof(), 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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 184 of file TensorI.H.
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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 191 of file TensorI.H.
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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::tr(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 198 of file TensorI.H.
Referenced by Foam::cof(), 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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 205 of file TensorI.H.
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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 212 of file TensorI.H.
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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 219 of file TensorI.H.
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(), SpatialTensor< Cmpt >::SpatialTensor(), Foam::symm(), Tensor< scalar >::T(), Foam::tr(), Foam::transform(), coordinateRotation::transformPrincipal(), and Foam::twoSymm().
|
inline |
Definition at line 289 of file TensorI.H.
Referenced by polygonTriangulate::angle(), molecule::constantProperties::constantProperties(), EulerCoordinateRotation::e1(), STARCDCoordinateRotation::e1(), axesRotation::e1(), triad::operator=(), Foam::triIntersect::srcEdgeTgtPointOffset(), Foam::triIntersect::srcPointTgtEdgeOffset(), Foam::triIntersect::srcPointTgtTriIntersection(), Foam::triIntersect::srcTriTgtPointIntersection(), triad::triad(), and waveSuperposition::UGas().
|
inline |
Definition at line 296 of file TensorI.H.
Referenced by polygonTriangulate::angle(), molecule::constantProperties::constantProperties(), EulerCoordinateRotation::e2(), STARCDCoordinateRotation::e2(), axesRotation::e2(), triad::operator=(), Foam::triIntersect::srcEdgeTgtEdgeIntersection(), Foam::triIntersect::srcEdgeTgtPointOffset(), Foam::triIntersect::srcPointTgtEdgeOffset(), Foam::triIntersect::srcPointTgtTriIntersection(), Foam::triIntersect::srcTriTgtPointIntersection(), triad::triad(), and waveSuperposition::UGas().
|
inline |
Definition at line 303 of file TensorI.H.
Referenced by polygonTriangulate::angle(), molecule::constantProperties::constantProperties(), EulerCoordinateRotation::e3(), STARCDCoordinateRotation::e3(), axesRotation::e3(), triad::operator=(), Foam::triIntersect::srcEdgeTgtEdgeIntersection(), Foam::triIntersect::srcEdgeTgtPointOffset(), Foam::triIntersect::srcPointTgtEdgeOffset(), Foam::triIntersect::srcPointTgtTriIntersection(), Foam::triIntersect::srcTriTgtPointIntersection(), triad::triad(), and waveSuperposition::UGas().
|
inline |
Definition at line 311 of file TensorI.H.
Referenced by Tensor< scalar >::z().
|
inline |
Return transpose.
Definition at line 331 of file TensorI.H.
Referenced by sixDoFRigidBodyMotion::addConstraints(), polygonTriangulate::angle(), transformer::invT(), transformer::invTransformPosition(), molecule::move(), spatialTransform::transpose::operator spatialTensor(), transformOp< PrimitivePatchType, Type, TrackingData >::operator()(), Foam::RBD::transform(), sixDoFRigidBodyMotion::transform(), molecule::transformProperties(), and triad::triad().
Inner-product with a Tensor.
Referenced by Tensor< scalar >::T().
|
inline |
|
inline |
Assign to a SphericalTensor.
|
inline |
Assign to a DiagTensor.
|
inline |
Assign to a SymmTensor.
|
static |