CompactSpatialTensor< Cmpt > Class Template Reference

Templated 3D compact spatial tensor derived from MatrixSpace used to represent transformations of spatial vectors and the angular and linear inertia of rigid bodies. More...

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

Public Member Functions

 CompactSpatialTensor ()
 Construct null. More...
 
 CompactSpatialTensor (const Foam::zero)
 
 CompactSpatialTensor (const typename CompactSpatialTensor::msType &)
 Construct given MatrixSpace of the same rank. More...
 
 CompactSpatialTensor (const Cmpt &t00, const Cmpt &t01, const Cmpt &t02, const Cmpt &t10, const Cmpt &t11, const Cmpt &t12, const Cmpt &t20, const Cmpt &t21, const Cmpt &t22, const Cmpt &t30, const Cmpt &t31, const Cmpt &t32, const Cmpt &t40, const Cmpt &t41, const Cmpt &t42, const Cmpt &t50, const Cmpt &t51, const Cmpt &t52)
 Construct given 18 components. More...
 
 CompactSpatialTensor (Istream &)
 Construct from Istream. More...
 
- Public Member Functions inherited from MatrixSpace< CompactSpatialTensor< Cmpt >, Cmpt, 6, 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< CompactSpatialTensor< 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, CompactSpatialTensor< 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< CompactSpatialTensor< Cmpt >, Cmpt, Mrows, Ncols >::template ConstBlock< SubTensor, BRowStart, BColStart > block () const
 
Foam::MatrixSpace< CompactSpatialTensor< 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< CompactSpatialTensor< Cmpt >, BRowStart, BColStart > &block)
 Assignment to a block of another matrix space. More...
 
void operator&= (const MatrixSpace< CompactSpatialTensor< Cmpt >, Cmpt, Ncols, Ncols > &matrix)
 Inner product with a compatible square matrix. More...
 
- Public Member Functions inherited from VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Mrows *Ncols >
 VectorSpace ()=default
 Default construct. More...
 
 VectorSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 VectorSpace (const VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Ncmpts > &vs)
 Copy construct. More...
 
 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...
 
const ConstBlock< SubVector, BStart > block () const
 
const Foam::VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 
const Cmpt & operator[] (const direction) const
 
Cmpt & operator[] (const direction)
 
void operator= (const VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Ncmpts > &)
 
void operator= (const Foam::zero)
 
void operator+= (const VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Ncmpts > &)
 
void operator-= (const VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Ncmpts > &)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 
iterator begin () noexcept
 Return an iterator to begin of VectorSpace. More...
 
const_iterator begin () const noexcept
 Return const_iterator to begin of VectorSpace. More...
 
iterator end () noexcept
 Return an iterator to end of VectorSpace. More...
 
const_iterator end () const noexcept
 Return const_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...
 

Additional Inherited Members

- Public Types inherited from MatrixSpace< CompactSpatialTensor< Cmpt >, Cmpt, 6, 3 >
typedef MatrixSpace< CompactSpatialTensor< Cmpt >, Cmpt, Mrows, Ncols > msType
 MatrixSpace type. More...
 
- Public Types inherited from VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Mrows *Ncols >
typedef VectorSpace< CompactSpatialTensor< Cmpt >, 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...
 
- Static Public Member Functions inherited from MatrixSpace< CompactSpatialTensor< Cmpt >, Cmpt, 6, 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< CompactSpatialTensor< Cmpt >, Cmpt, Mrows *Ncols >
static constexpr direction size () noexcept
 The number of elements in the VectorSpace = Ncmpts. More...
 
static CompactSpatialTensor< Cmpt > uniform (const Cmpt &s)
 Return a VectorSpace with all elements = s. More...
 
- Public Attributes inherited from VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Mrows *Ncols >
const typedef Cmpt * const_iterator
 Random access iterator for traversing VectorSpace. More...
 
Cmpt v_ [Ncmpts]
 The components of this vector space. More...
 
- Static Public Attributes inherited from MatrixSpace< CompactSpatialTensor< Cmpt >, Cmpt, 6, 3 >
static constexpr direction mRows
 
static constexpr direction nCols
 
- Static Public Attributes inherited from VectorSpace< CompactSpatialTensor< Cmpt >, Cmpt, Mrows *Ncols >
static constexpr direction dim
 Dimensionality of space. More...
 
static constexpr direction nComponents
 Number of components in this vector space. More...
 
static constexpr direction mRows
 
static constexpr direction nCols
 
static const char *const typeName
 
static const char *const componentNames []
 
static const CompactSpatialTensor< Cmpt > zero
 
static const CompactSpatialTensor< Cmpt > one
 
static const CompactSpatialTensor< Cmpt > max
 
static const CompactSpatialTensor< Cmpt > min
 
static const CompactSpatialTensor< Cmpt > rootMax
 
static const CompactSpatialTensor< Cmpt > rootMin
 

Detailed Description

template<class Cmpt>
class Foam::CompactSpatialTensor< Cmpt >

Templated 3D compact spatial tensor derived from MatrixSpace used to represent transformations of spatial vectors and the angular and linear inertia of rigid bodies.

Reference:

    Featherstone, R. (2008).
    Rigid body dynamics algorithms.
    Springer.
Source files
See also
Foam::MatrixSpace Foam::SpatialTensor

Definition at line 65 of file CompactSpatialTensor.H.

Constructor & Destructor Documentation

◆ CompactSpatialTensor() [1/5]

Construct null.

Definition at line 31 of file CompactSpatialTensorI.H.

◆ CompactSpatialTensor() [2/5]

CompactSpatialTensor ( const Foam::zero  )
inline

Definition at line 37 of file CompactSpatialTensorI.H.

◆ CompactSpatialTensor() [3/5]

CompactSpatialTensor ( const typename CompactSpatialTensor< Cmpt >::msType ms)
inline

Construct given MatrixSpace of the same rank.

Definition at line 47 of file CompactSpatialTensorI.H.

◆ CompactSpatialTensor() [4/5]

CompactSpatialTensor ( const Cmpt &  t00,
const Cmpt &  t01,
const Cmpt &  t02,
const Cmpt &  t10,
const Cmpt &  t11,
const Cmpt &  t12,
const Cmpt &  t20,
const Cmpt &  t21,
const Cmpt &  t22,
const Cmpt &  t30,
const Cmpt &  t31,
const Cmpt &  t32,
const Cmpt &  t40,
const Cmpt &  t41,
const Cmpt &  t42,
const Cmpt &  t50,
const Cmpt &  t51,
const Cmpt &  t52 
)
inline

Construct given 18 components.

Definition at line 57 of file CompactSpatialTensorI.H.

◆ CompactSpatialTensor() [5/5]

CompactSpatialTensor ( Istream is)
inline

Construct from Istream.

Definition at line 93 of file CompactSpatialTensorI.H.


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