Templated 4x3 tensor derived from VectorSpace. Has 12 components. Can represent a barycentric transformation as a matrix-barycentric inner-product. More...
#include <BarycentricTensor.H>


Public Types | |
| enum | components { XA , XB , XC , XD , YA , YB , YC , YD , ZA , ZB , ZC , ZD } |
| Component labeling enumeration. More... | |
| typedef BarycentricTensor< label > | labelType |
| Equivalent type of labels used for valid component indexing (unused). | |
| Public Types inherited from MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, 4, 3 > | |
| typedef MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows, Ncols > | msType |
| MatrixSpace type. | |
| Public Types inherited from VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols > | |
| typedef VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Ncmpts > | vsType |
| VectorSpace type. | |
| typedef Cmpt | cmptType |
| Component type. | |
| typedef Cmpt | magType |
| Magnitude type. | |
| typedef direction | size_type |
| The type to represent the size of a VectorSpace. | |
| typedef Cmpt * | iterator |
| Random access iterator for traversing VectorSpace. | |
| typedef const Cmpt * | const_iterator |
| Random access iterator for traversing VectorSpace. | |
Public Member Functions | |
| BarycentricTensor ()=default | |
| Default construct. | |
| BarycentricTensor (const Foam::zero) | |
| Construct initialised to zero. | |
| BarycentricTensor (const Barycentric< Cmpt > &x, const Barycentric< Cmpt > &y, const Barycentric< Cmpt > &z) | |
| Construct given three barycentric components (rows). | |
| BarycentricTensor (const Vector< Cmpt > &a, const Vector< Cmpt > &b, const Vector< Cmpt > &c, const Vector< Cmpt > &d) | |
| Construct given four vector components (columns). | |
| const Cmpt & | xa () const noexcept |
| const Cmpt & | xb () const noexcept |
| const Cmpt & | xc () const noexcept |
| const Cmpt & | xd () const noexcept |
| const Cmpt & | ya () const noexcept |
| const Cmpt & | yb () const noexcept |
| const Cmpt & | yc () const noexcept |
| const Cmpt & | yd () const noexcept |
| const Cmpt & | za () const noexcept |
| const Cmpt & | zb () const noexcept |
| const Cmpt & | zc () const noexcept |
| const Cmpt & | zd () const noexcept |
| Barycentric< Cmpt > | x () const |
| Barycentric< Cmpt > | y () const |
| Barycentric< Cmpt > | z () const |
| Vector< Cmpt > | a () const |
| Vector< Cmpt > | b () const |
| Vector< Cmpt > | c () const |
| Vector< Cmpt > | d () const |
| Vector< Cmpt > | inner (const Barycentric< Cmpt > &bry) const |
| Tensor/barycentric inner product. | |
| Public Member Functions inherited from MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, 4, 3 > | |
| Foam::MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows, Ncols >::template ConstBlock< SubTensor, BRowStart, BColStart > | block () const |
| Foam::MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows, Ncols >::template Block< SubTensor, BRowStart, BColStart > | block () |
| MatrixSpace ()=default | |
| Default construct. | |
| const Cmpt & | elmt () const noexcept |
| Fast const element access using compile-time addressing. | |
| const Cmpt & | xx () const noexcept |
| const Cmpt & | xy () const noexcept |
| const Cmpt & | xz () const noexcept |
| const Cmpt & | yx () const noexcept |
| const Cmpt & | yy () const noexcept |
| const Cmpt & | yz () const noexcept |
| const Cmpt & | zx () const noexcept |
| const Cmpt & | zy () const noexcept |
| const Cmpt & | zz () const noexcept |
| typeOfTranspose< Cmpt, BarycentricTensor< Cmpt > >::type | T () const |
| Return the transpose of the matrix. | |
| const Cmpt & | operator() (const direction i, const direction j) const |
| (i, j) const element access operator | |
| void | operator= (Foam::zero) |
| Assignment to zero. | |
| void | operator&= (const MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, Ncols, Ncols > &matrix) |
| Inner product with a compatible square matrix. | |
| Public Member Functions inherited from VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols > | |
| const Foam::VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
| VectorSpace ()=default | |
| Default construct. | |
| const Cmpt & | component (const direction) const |
| void | replace (const direction, const Cmpt &) |
| const Cmpt * | cdata () const noexcept |
| Return const pointer to the first data element. | |
| Cmpt * | data () noexcept |
| Return pointer to the first data element. | |
| void | fill (const Cmpt &s) |
| Assign all components to given value. | |
| const Cmpt & | operator[] (const direction) const |
| void | operator= (const VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Ncmpts > &) |
| void | operator+= (const VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Ncmpts > &) |
| void | operator-= (const VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Ncmpts > &) |
| void | operator*= (const scalar) |
| void | operator/= (const scalar) |
| iterator | begin () noexcept |
| Return an iterator (pointer) to begin of VectorSpace. | |
| const_iterator | cbegin () const noexcept |
| Return const_iterator (const pointer) to begin of VectorSpace. | |
| iterator | end () noexcept |
| Return an iterator (pointer) to end of VectorSpace. | |
| const_iterator | cend () const noexcept |
| Return const_iterator (const pointer) to end of VectorSpace. | |
Static Public Attributes | |
| static constexpr direction | rank = 2 |
| Rank of BarycentricTensor is 2. | |
| Static Public Attributes inherited from MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, 4, 3 > | |
| static constexpr direction | mRows |
| static constexpr direction | nCols |
| Static Public Attributes inherited from VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols > | |
| static constexpr direction | dim |
| Dimensionality of space. | |
| static constexpr direction | nComponents |
| Number of components in this vector space. | |
| static constexpr direction | mRows |
| static constexpr direction | nCols |
| static const char *const | typeName |
| static const char *const | componentNames [] |
| static const BarycentricTensor< Cmpt > | zero |
| static const BarycentricTensor< Cmpt > | one |
| static const BarycentricTensor< Cmpt > | max |
| static const BarycentricTensor< Cmpt > | min |
| static const BarycentricTensor< Cmpt > | rootMax |
| static const BarycentricTensor< Cmpt > | rootMin |
Additional Inherited Members | |
| Static Public Member Functions inherited from MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, 4, 3 > | |
| static direction | m () noexcept |
| The number of rows. | |
| static direction | n () noexcept |
| The number of columns. | |
| static msType | identity () |
| An identity matrix for square matrix-spaces. | |
| Static Public Member Functions inherited from VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols > | |
| static constexpr direction | size () noexcept |
| The number of elements in the VectorSpace = Ncmpts. | |
| static BarycentricTensor< Cmpt > | uniform (const Cmpt &s) |
| Return a VectorSpace with all elements = s. | |
| Public Attributes inherited from VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols > | |
| Cmpt | v_ [Ncmpts] |
| The components of this vector space. | |
Templated 4x3 tensor derived from VectorSpace. Has 12 components. Can represent a barycentric transformation as a matrix-barycentric inner-product.
Definition at line 52 of file BarycentricTensor.H.
| typedef BarycentricTensor<label> labelType |
Equivalent type of labels used for valid component indexing (unused).
Definition at line 64 of file BarycentricTensor.H.
| enum components |
Component labeling enumeration.
| Enumerator | |
|---|---|
| XA | |
| XB | |
| XC | |
| XD | |
| YA | |
| YB | |
| YC | |
| YD | |
| ZA | |
| ZB | |
| ZC | |
| ZD | |
Definition at line 78 of file BarycentricTensor.H.
|
default |
Default construct.
Referenced by BarycentricTensor(), and inner().

|
inline |
Construct initialised to zero.
Definition at line 25 of file BarycentricTensorI.H.
References BarycentricTensor(), and Foam::Zero.

|
inline |
|
inline |
Construct given four vector components (columns).
Eg, the corners of a tetrahedron
Definition at line 57 of file BarycentricTensorI.H.
References a(), b(), c(), d(), VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols >::v_, XA, XB, XC, XD, YA, YB, YC, YD, ZA, ZB, ZC, and ZD.

|
inlinenoexcept |
Definition at line 124 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 125 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 126 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 127 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 129 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 130 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 131 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 132 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 134 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 135 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 136 of file BarycentricTensor.H.
Referenced by inner().

|
inlinenoexcept |
Definition at line 137 of file BarycentricTensor.H.
Referenced by inner().

|
inline |
Definition at line 85 of file BarycentricTensorI.H.
References VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols >::v_, XA, XB, XC, and XD.
Referenced by BarycentricTensor().

|
inline |
Definition at line 99 of file BarycentricTensorI.H.
References VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols >::v_, YA, YB, YC, and YD.
Referenced by BarycentricTensor().

|
inline |
Definition at line 113 of file BarycentricTensorI.H.
References VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols >::v_, ZA, ZB, ZC, and ZD.
Referenced by BarycentricTensor().

|
inline |
Definition at line 127 of file BarycentricTensorI.H.
References VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols >::v_, XA, YA, and ZA.
Referenced by BarycentricTensor().

|
inline |
Definition at line 134 of file BarycentricTensorI.H.
References VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols >::v_, XB, YB, and ZB.
Referenced by BarycentricTensor().

|
inline |
Definition at line 141 of file BarycentricTensorI.H.
References VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols >::v_, XC, YC, and ZC.
Referenced by BarycentricTensor().

|
inline |
Definition at line 148 of file BarycentricTensorI.H.
References VectorSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows *Ncols >::v_, XD, YD, and ZD.
Referenced by BarycentricTensor().

|
inline |
Tensor/barycentric inner product.
(transforms barycentric coordinates to vector)
Definition at line 161 of file BarycentricTensorI.H.
References Barycentric< Cmpt >::a(), Barycentric< Cmpt >::b(), BarycentricTensor(), Barycentric< Cmpt >::c(), Barycentric< Cmpt >::d(), xa(), xb(), xc(), xd(), ya(), yb(), yc(), yd(), za(), zb(), zc(), and zd().

|
staticconstexpr |
Rank of BarycentricTensor is 2.
Definition at line 72 of file BarycentricTensor.H.