BarycentricTensor< Cmpt > Class Template Reference

Templated 4x3 tensor derived from VectorSpace. Has 12 components. Can represent a barycentric transformation as a matrix-barycentric inner- product. Can alternatively represent an inverse barycentric transformation as a vector-matrix inner-product. More...

Inheritance diagram for BarycentricTensor< Cmpt >:
[legend]
Collaboration diagram for BarycentricTensor< Cmpt >:
[legend]

Public Types

enum  components {
  XA , XB , XC , XD ,
  YA , YB , YC , YD ,
  ZA , ZB , ZC , ZD
}
 Component labeling enumeration. More...
 
typedef Tensor< label > labelType
 Equivalent type of labels used for valid component indexing. More...
 
- Public Types inherited from MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, 4, 3 >
typedef MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, Mrows, Ncols > msType
 MatrixSpace type. More...
 
- Public Types inherited from VectorSpace< Form, Cmpt, Ncmpts >
typedef VectorSpace< Form, 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...
 
typedef const Cmpt * const_iterator
 Random access iterator for traversing VectorSpace. More...
 

Public Member Functions

 BarycentricTensor ()=default
 Default construct. More...
 
 BarycentricTensor (const Foam::zero)
 Construct initialised to zero. More...
 
 BarycentricTensor (const Barycentric< Cmpt > &x, const Barycentric< Cmpt > &y, const Barycentric< Cmpt > &z)
 Construct given three barycentric components (rows) More...
 
 BarycentricTensor (const Vector< Cmpt > &a, const Vector< Cmpt > &b, const Vector< Cmpt > &c, const Vector< Cmpt > &d)
 Construct given four vector components (columns) More...
 
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
 
- Public Member Functions inherited from MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, 4, 3 >
 MatrixSpace ()=default
 Default construct. More...
 
 MatrixSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 MatrixSpace (const VectorSpace< Form2, Cmpt2, Mrows *Ncols > &)
 Construct as copy of a VectorSpace with the same size. More...
 
 MatrixSpace (const Block2< BarycentricTensor< Cmpt >, BRowStart, BColStart > &block)
 Construct from a block of another matrix space. More...
 
 MatrixSpace (Istream &is)
 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, BarycentricTensor< 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< 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 ()
 
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< BarycentricTensor< Cmpt >, BRowStart, BColStart > &block)
 Assignment to a block of another matrix space. More...
 
void operator&= (const MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, Ncols, Ncols > &matrix)
 Inner product with a compatible square matrix. More...
 
- Public Member Functions inherited from VectorSpace< Form, Cmpt, Ncmpts >
 VectorSpace ()=default
 Default construct. More...
 
 VectorSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 VectorSpace (const VectorSpace< Form, Cmpt, Ncmpts > &vs)
 Copy construct. More...
 
template<class Form2 , class Cmpt2 >
 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...
 
template<class SubVector , direction BStart>
const ConstBlock< SubVector, BStart > block () const
 
const Cmpt & operator[] (const direction) const
 
Cmpt & operator[] (const direction)
 
void operator= (const VectorSpace< Form, Cmpt, Ncmpts > &)
 
void operator+= (const VectorSpace< Form, Cmpt, Ncmpts > &)
 
void operator-= (const VectorSpace< Form, Cmpt, Ncmpts > &)
 
void operator= (const Foam::zero)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 
iterator begin () noexcept
 Return an iterator to begin of VectorSpace. More...
 
iterator end () noexcept
 Return an 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...
 
const_iterator begin () const noexcept
 Return const_iterator to begin of VectorSpace. More...
 
const_iterator end () const noexcept
 Return const_iterator to end of VectorSpace. More...
 
template<class SubVector , Foam::direction BStart>
const Foam::VectorSpace< Form, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 

Static Public Attributes

static constexpr direction rank = 2
 Rank of BarycentricTensor is 2. More...
 
- 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< Form, Cmpt, Ncmpts >
static constexpr direction dim = 3
 Dimensionality of space. More...
 
static constexpr direction nComponents = Ncmpts
 Number of components in this vector space. More...
 
static constexpr direction mRows = Ncmpts
 
static constexpr direction nCols = 1
 
static const char *const typeName = "diagTensor"
 
static const char *const componentNames []
 
static const Form zero
 
static const Form one
 
static const Form max
 
static const Form min
 
static const Form rootMax
 
static const Form rootMin
 

Additional Inherited Members

- Static Public Member Functions inherited from MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, 4, 3 >
static direction m () noexcept
 The number of rows. More...
 
static direction n () noexcept
 The number of columns. More...
 
static msType identity ()
 An identity matrix for square matrix-spaces. More...
 
- Static Public Member Functions inherited from VectorSpace< Form, Cmpt, Ncmpts >
static constexpr direction size () noexcept
 The number of elements in the VectorSpace = Ncmpts. More...
 
static Form uniform (const Cmpt &s)
 Return a VectorSpace with all elements = s. More...
 
- Public Attributes inherited from VectorSpace< Form, Cmpt, Ncmpts >
Cmpt v_ [Ncmpts]
 The components of this vector space. More...
 

Detailed Description

template<class Cmpt>
class Foam::BarycentricTensor< Cmpt >

Templated 4x3 tensor derived from VectorSpace. Has 12 components. Can represent a barycentric transformation as a matrix-barycentric inner- product. Can alternatively represent an inverse barycentric transformation as a vector-matrix inner-product.

Source files

Definition at line 57 of file BarycentricTensor.H.

Member Typedef Documentation

◆ labelType

typedef Tensor<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 66 of file BarycentricTensor.H.

Member Enumeration Documentation

◆ components

enum components

Component labeling enumeration.

Enumerator
XA 
XB 
XC 
XD 
YA 
YB 
YC 
YD 
ZA 
ZB 
ZC 
ZD 

Definition at line 76 of file BarycentricTensor.H.

Constructor & Destructor Documentation

◆ BarycentricTensor() [1/4]

BarycentricTensor ( )
default

Default construct.

◆ BarycentricTensor() [2/4]

BarycentricTensor ( const Foam::zero  )
inline

Construct initialised to zero.

Definition at line 31 of file BarycentricTensorI.H.

◆ BarycentricTensor() [3/4]

BarycentricTensor ( const Barycentric< Cmpt > &  x,
const Barycentric< Cmpt > &  y,
const Barycentric< Cmpt > &  z 
)
inline

Construct given three barycentric components (rows)

Definition at line 38 of file BarycentricTensorI.H.

References Barycentric< Cmpt >::a(), Barycentric< Cmpt >::b(), Barycentric< Cmpt >::c(), Barycentric< Cmpt >::d(), x, and y.

Here is the call graph for this function:

◆ BarycentricTensor() [4/4]

BarycentricTensor ( const Vector< Cmpt > &  a,
const Vector< Cmpt > &  b,
const Vector< Cmpt > &  c,
const Vector< Cmpt > &  d 
)
inline

Construct given four vector components (columns)

Definition at line 63 of file BarycentricTensorI.H.

References b, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

Member Function Documentation

◆ x()

Foam::Barycentric< Cmpt > x
inline

Definition at line 91 of file BarycentricTensorI.H.

◆ y()

Foam::Barycentric< Cmpt > y
inline

Definition at line 105 of file BarycentricTensorI.H.

◆ z()

Foam::Barycentric< Cmpt > z
inline

Definition at line 119 of file BarycentricTensorI.H.

◆ a()

Foam::Vector< Cmpt > a
inline

Definition at line 133 of file BarycentricTensorI.H.

◆ b()

Foam::Vector< Cmpt > b
inline

Definition at line 140 of file BarycentricTensorI.H.

◆ c()

Foam::Vector< Cmpt > c
inline

Definition at line 147 of file BarycentricTensorI.H.

◆ d()

Foam::Vector< Cmpt > d
inline

Definition at line 154 of file BarycentricTensorI.H.

Member Data Documentation

◆ rank

constexpr direction rank = 2
staticconstexpr

Rank of BarycentricTensor is 2.

Definition at line 72 of file BarycentricTensor.H.


The documentation for this class was generated from the following files: