Loading...
Searching...
No Matches
CompactSpatialTensorT< Cmpt > Class Template Reference

Templated 3D transposed compact spatial tensor derived from MatrixSpace used to represent transformations of spatial vectors of rigid bodies. More...

#include <CompactSpatialTensorT.H>

Inheritance diagram for CompactSpatialTensorT< Cmpt >:
Collaboration diagram for CompactSpatialTensorT< Cmpt >:

Public Member Functions

 CompactSpatialTensorT ()=default
 Default construct.
 CompactSpatialTensorT (const Foam::zero)
 CompactSpatialTensorT (const typename CompactSpatialTensorT::msType &)
 Construct given MatrixSpace of the same rank.
 CompactSpatialTensorT (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.
 CompactSpatialTensorT (Istream &)
 Construct from Istream.
Public Member Functions inherited from MatrixSpace< CompactSpatialTensorT< Cmpt >, Cmpt, 3, 6 >
Foam::MatrixSpace< CompactSpatialTensorT< Cmpt >, Cmpt, Mrows, Ncols >::template ConstBlock< SubTensor, BRowStart, BColStart > block () const
Foam::MatrixSpace< CompactSpatialTensorT< 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, CompactSpatialTensorT< 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< CompactSpatialTensorT< Cmpt >, Cmpt, Ncols, Ncols > &matrix)
 Inner product with a compatible square matrix.
Public Member Functions inherited from VectorSpace< CompactSpatialTensorT< Cmpt >, Cmpt, Mrows *Ncols >
const Foam::VectorSpace< CompactSpatialTensorT< 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< CompactSpatialTensorT< Cmpt >, Cmpt, Ncmpts > &)
void operator+= (const VectorSpace< CompactSpatialTensorT< Cmpt >, Cmpt, Ncmpts > &)
void operator-= (const VectorSpace< CompactSpatialTensorT< 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.

Additional Inherited Members

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

Detailed Description

template<class Cmpt>
class Foam::CompactSpatialTensorT< Cmpt >

Templated 3D transposed compact spatial tensor derived from MatrixSpace used to represent transformations of spatial vectors of rigid bodies.

Reference:

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

Definition at line 60 of file CompactSpatialTensorT.H.

Constructor & Destructor Documentation

◆ CompactSpatialTensorT() [1/5]

template<class Cmpt>
CompactSpatialTensorT ( )
default

Default construct.

Referenced by CompactSpatialTensorT(), CompactSpatialTensorT(), and CompactSpatialTensorT().

Here is the caller graph for this function:

◆ CompactSpatialTensorT() [2/5]

template<class Cmpt>
CompactSpatialTensorT ( const Foam::zero )
inline

Definition at line 24 of file CompactSpatialTensorTI.H.

References CompactSpatialTensorT(), and Foam::Zero.

Here is the call graph for this function:

◆ CompactSpatialTensorT() [3/5]

template<class Cmpt>
CompactSpatialTensorT ( const typename CompactSpatialTensorT< Cmpt >::msType & ms)
inline

Construct given MatrixSpace of the same rank.

Definition at line 34 of file CompactSpatialTensorTI.H.

References CompactSpatialTensorT().

Here is the call graph for this function:

◆ CompactSpatialTensorT() [4/5]

template<class Cmpt>
CompactSpatialTensorT ( 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 44 of file CompactSpatialTensorTI.H.

References VectorSpace< CompactSpatialTensorT< Cmpt >, Cmpt, Mrows *Ncols >::v_.

◆ CompactSpatialTensorT() [5/5]

template<class Cmpt>
CompactSpatialTensorT ( Istream & is)
inlineexplicit

Construct from Istream.

Definition at line 81 of file CompactSpatialTensorTI.H.

References CompactSpatialTensorT().

Here is the call graph for this function:

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