Public Types | Public Member Functions | Static Public Attributes | List of all members
SymmTensor2D< Cmpt > Class Template Reference

A templated (2 x 2) symmetric tensor of objects of <T>, effectively containing 3 elements, derived from VectorSpace. More...

Inheritance diagram for SymmTensor2D< Cmpt >:
Inheritance graph
[legend]
Collaboration diagram for SymmTensor2D< Cmpt >:
Collaboration graph
[legend]

Public Types

enum  components { XX, XY, YY }
 
typedef SymmTensor2D< label > labelType
 
- Public Types inherited from VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 >
typedef VectorSpace< Form, Cmpt, Ncmpts > vsType
 
typedef Cmpt cmptType
 
typedef Cmpt magType
 
typedef Cmpt * iterator
 

Public Member Functions

 SymmTensor2D ()=default
 
 SymmTensor2D (const SymmTensor2D &)=default
 
SymmTensor2Doperator= (const SymmTensor2D &)=default
 
 SymmTensor2D (const Foam::zero)
 
 SymmTensor2D (const VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 > &)
 
 SymmTensor2D (const SphericalTensor2D< Cmpt > &)
 
 SymmTensor2D (const Cmpt txx, const Cmpt txy, const Cmpt tyy)
 
 SymmTensor2D (Istream &is)
 
const Cmpt & xx () const
 
const Cmpt & xy () const
 
const Cmpt & yx () const
 
const Cmpt & yy () const
 
Cmpt & xx ()
 
Cmpt & xy ()
 
Cmpt & yx ()
 
Cmpt & yy ()
 
Vector2D< Cmpt > diag () const
 
void diag (const Vector2D< Cmpt > &v)
 
const SymmTensor2D< Cmpt > & T () const
 
void operator= (const SphericalTensor2D< Cmpt > &)
 
- Public Member Functions inherited from VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 >
 VectorSpace ()=default
 
 VectorSpace (const Foam::zero)
 
 VectorSpace (const VectorSpace< Form, Cmpt, Ncmpts > &vs)
 
 VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &)
 
 VectorSpace (Istream &is)
 
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
 
Cmpt * data () noexcept
 
const ConstBlock< SubVector, BStart > block () const
 
const Foam::VectorSpace< Form, Cmpt, Ncmpts >::template 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 Foam::zero)
 
void operator+= (const VectorSpace< Form, Cmpt, Ncmpts > &)
 
void operator-= (const VectorSpace< Form, Cmpt, Ncmpts > &)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 

Static Public Attributes

static constexpr direction rank = 2
 
static const SymmTensor2D I
 
- Static Public Attributes inherited from VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 >
static constexpr direction dim
 
static constexpr direction nComponents
 
static constexpr direction mRows
 
static constexpr direction nCols
 
static const char *const typeName
 
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 VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 >
static constexpr direction size () noexcept
 
static Form uniform (const Cmpt &s)
 
- Public Attributes inherited from VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 >
const typedef Cmpt * const_iterator
 
Cmpt v_ [Ncmpts]
 

Detailed Description

template<class Cmpt>
class Foam::SymmTensor2D< Cmpt >

A templated (2 x 2) symmetric tensor of objects of <T>, effectively containing 3 elements, derived from VectorSpace.

See also
Test-SymmTensor2D.C
Source files

Definition at line 54 of file SymmTensor2D.H.

Member Typedef Documentation

◆ labelType

typedef SymmTensor2D<label> labelType

Definition at line 63 of file SymmTensor2D.H.

Member Enumeration Documentation

◆ components

enum components
Enumerator
XX 
XY 
YY 

Definition at line 78 of file SymmTensor2D.H.

Constructor & Destructor Documentation

◆ SymmTensor2D() [1/7]

SymmTensor2D ( )
default

◆ SymmTensor2D() [2/7]

SymmTensor2D ( const SymmTensor2D< Cmpt > &  )
default

◆ SymmTensor2D() [3/7]

SymmTensor2D ( const Foam::zero  )
inline

Definition at line 27 of file SymmTensor2DI.H.

◆ SymmTensor2D() [4/7]

SymmTensor2D ( const VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 > &  vs)
inline

Definition at line 35 of file SymmTensor2DI.H.

◆ SymmTensor2D() [5/7]

SymmTensor2D ( const SphericalTensor2D< Cmpt > &  st)
inline

Definition at line 44 of file SymmTensor2DI.H.

References SphericalTensor2D< Cmpt >::ii(), and Foam::Zero.

Here is the call graph for this function:

◆ SymmTensor2D() [6/7]

SymmTensor2D ( const Cmpt  txx,
const Cmpt  txy,
const Cmpt  tyy 
)
inline

Definition at line 53 of file SymmTensor2DI.H.

◆ SymmTensor2D() [7/7]

SymmTensor2D ( Istream is)
inlineexplicit

Definition at line 64 of file SymmTensor2DI.H.

Member Function Documentation

◆ operator=() [1/2]

SymmTensor2D& operator= ( const SymmTensor2D< Cmpt > &  )
default

◆ xx() [1/2]

Cmpt & xx
inline

◆ xy() [1/2]

Cmpt & xy
inline

◆ yx() [1/2]

Cmpt & yx
inline

Definition at line 85 of file SymmTensor2DI.H.

Referenced by Foam::cof().

Here is the caller graph for this function:

◆ yy() [1/2]

Cmpt & yy
inline

◆ xx() [2/2]

Cmpt& xx ( )
inline

◆ xy() [2/2]

Cmpt& xy ( )
inline

◆ yx() [2/2]

Cmpt& yx ( )
inline

◆ yy() [2/2]

Cmpt& yy ( )
inline

◆ diag() [1/2]

Foam::Vector2D< Cmpt > diag
inline

Definition at line 123 of file SymmTensor2DI.H.

◆ diag() [2/2]

void diag ( const Vector2D< Cmpt > &  v)
inline

Definition at line 130 of file SymmTensor2DI.H.

References Vector2D< Cmpt >::x(), and Vector2D< Cmpt >::y().

Here is the call graph for this function:

◆ T()

const Foam::SymmTensor2D< Cmpt > & T
inline

Definition at line 137 of file SymmTensor2DI.H.

◆ operator=() [2/2]

void operator= ( const SphericalTensor2D< Cmpt > &  st)
inline

Definition at line 147 of file SymmTensor2DI.H.

References Foam::Zero.

Member Data Documentation

◆ rank

constexpr direction rank = 2
staticconstexpr

Definition at line 69 of file SymmTensor2D.H.

◆ I

const Foam::symmTensor2D I
static

Definition at line 74 of file SymmTensor2D.H.


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