FreeFOAM The Cross-Platform CFD Toolkit
SymmTensor< Cmpt > Class Template Reference

Templated 3D symmetric tensor derived from VectorSpace adding construction from 6 components, element access using xx(), xy() etc. member functions and the inner-product (dot-product) and outer-product of two Vectors (tensor-product) operators. More...

#include <OpenFOAM/SymmTensor_.H>


Detailed Description

template<class Cmpt>
class Foam::SymmTensor< Cmpt >

Templated 3D symmetric tensor derived from VectorSpace adding construction from 6 components, element access using xx(), xy() etc. member functions and the inner-product (dot-product) and outer-product of two Vectors (tensor-product) operators.

Source files

Definition at line 54 of file SymmTensor_.H.

+ Inheritance diagram for SymmTensor< Cmpt >:
+ Collaboration diagram for SymmTensor< Cmpt >:

List of all members.

Public Types

enum  { rank = 2 }
enum  components {
  XX, XY, XZ, YY,
  YZ, ZZ
}
 Component labeling enumeration. More...
typedef SymmTensor< label > labelType
 Equivalent type of labels used for valid component indexing.
- Public Types inherited from VectorSpace< SymmTensor< Cmpt >, Cmpt, 6 >
enum  
typedef Cmpt cmptType
 Component type.

Public Member Functions

 SymmTensor ()
 Construct null.
 SymmTensor (const VectorSpace< SymmTensor< Cmpt >, Cmpt, 6 > &)
 Construct given VectorSpace.
 SymmTensor (const SphericalTensor< Cmpt > &)
 Construct given SphericalTensor.
 SymmTensor (const Cmpt txx, const Cmpt txy, const Cmpt txz, const Cmpt tyy, const Cmpt tyz, const Cmpt tzz)
 Construct given the six components.
 SymmTensor (Istream &)
 Construct from Istream.
const Cmpt & xx () const
const Cmpt & xy () const
const Cmpt & xz () const
const Cmpt & yy () const
const Cmpt & yz () const
const Cmpt & zz () const
Cmpt & xx ()
Cmpt & xy ()
Cmpt & xz ()
Cmpt & yy ()
Cmpt & yz ()
Cmpt & zz ()
const SymmTensor< Cmpt > & T () const
 Transpose.
void operator= (const SphericalTensor< Cmpt > &)
 Construct given SphericalTensor.
- Public Member Functions inherited from VectorSpace< SymmTensor< Cmpt >, Cmpt, 6 >
 VectorSpace ()
 Construct null.
 VectorSpace (Istream &)
 Construct from Istream.
 VectorSpace (const VectorSpace< SymmTensor< Cmpt >, Cmpt, nCmpt > &)
 Construct as copy.
label size () const
 Return the number of elements in the VectorSpace = nCmpt.
const Cmpt & component (const direction) const
Cmpt & component (const direction)
void component (Cmpt &, const direction) const
void replace (const direction, const Cmpt &)
const Cmpt & operator[] (const direction) const
Cmpt & operator[] (const direction)
void operator= (const VectorSpace< SymmTensor< Cmpt >, Cmpt, nCmpt > &)
void operator+= (const VectorSpace< SymmTensor< Cmpt >, Cmpt, nCmpt > &)
void operator-= (const VectorSpace< SymmTensor< Cmpt >, Cmpt, nCmpt > &)
void operator*= (const scalar)
void operator/= (const scalar)

Static Public Attributes

static const char *const typeName = "labelSymmTensor"
static const char * componentNames []
static const SymmTensor zero
static const SymmTensor one
static const SymmTensor max
static const SymmTensor min

Additional Inherited Members

- Public Attributes inherited from VectorSpace< SymmTensor< Cmpt >, Cmpt, 6 >
Cmpt v_ [nCmpt]
 The components of this vector space.

Member Typedef Documentation

typedef SymmTensor<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 62 of file SymmTensor_.H.


Member Enumeration Documentation

anonymous enum
Enumerator:
rank 

Definition at line 67 of file SymmTensor_.H.

enum components

Component labeling enumeration.

Enumerator:
XX 
XY 
XZ 
YY 
YZ 
ZZ 

Definition at line 85 of file SymmTensor_.H.


Constructor & Destructor Documentation

SymmTensor ( )
inline

Construct null.

Definition at line 37 of file SymmTensorI_.H.

SymmTensor ( const VectorSpace< SymmTensor< Cmpt >, Cmpt, 6 > &  vs)
inline

Construct given VectorSpace.

Definition at line 43 of file SymmTensorI_.H.

SymmTensor ( const SphericalTensor< Cmpt > &  st)
inline

Construct given SphericalTensor.

Definition at line 52 of file SymmTensorI_.H.

References SphericalTensor< Cmpt >::ii().

SymmTensor ( const Cmpt  txx,
const Cmpt  txy,
const Cmpt  txz,
const Cmpt  tyy,
const Cmpt  tyz,
const Cmpt  tzz 
)
inline

Construct given the six components.

Definition at line 62 of file SymmTensorI_.H.

SymmTensor ( Istream is)
inline

Construct from Istream.

Definition at line 75 of file SymmTensorI_.H.


Member Function Documentation

Cmpt & xx ( )
inline

Definition at line 121 of file SymmTensorI_.H.

Cmpt & xy ( )
inline

Definition at line 127 of file SymmTensorI_.H.

Cmpt & xz ( )
inline

Definition at line 133 of file SymmTensorI_.H.

Cmpt & yy ( )
inline

Definition at line 139 of file SymmTensorI_.H.

Cmpt & yz ( )
inline

Definition at line 145 of file SymmTensorI_.H.

Cmpt & zz ( )
inline

Definition at line 151 of file SymmTensorI_.H.

const SymmTensor< Cmpt > & T ( ) const
inline

Transpose.

Definition at line 158 of file SymmTensorI_.H.

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

Construct given SphericalTensor.

Definition at line 167 of file SymmTensorI_.H.

References SphericalTensor< Cmpt >::ii().


Member Data Documentation

const char *const typeName = "labelSymmTensor"
static

Definition at line 75 of file SymmTensor_.H.

const char * componentNames
static
Initial value:
{
"xx", "xy", "xz",
"yy", "yz",
"zz"
}

Definition at line 76 of file SymmTensor_.H.

const symmTensor one
static

Definition at line 79 of file SymmTensor_.H.

const symmTensor max
static

Definition at line 80 of file SymmTensor_.H.

const symmTensor min
static

Definition at line 81 of file SymmTensor_.H.


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