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

Templated 2D symmetric tensor derived from VectorSpace adding construction from 4 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...

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

Public Types

enum  { rank = 2 }
 
enum  components { XX, XY, YY }
 Component labeling enumeration. More...
 
typedef SymmTensor2D< labellabelType
 Equivalent type of labels used for valid component indexing. More...
 
- Public Types inherited from VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 >
enum  
 
typedef Cmpt cmptType
 Component type. More...
 

Public Member Functions

 SymmTensor2D ()
 Construct null. More...
 
 SymmTensor2D (const VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 > &)
 Construct given VectorSpace. More...
 
 SymmTensor2D (const SphericalTensor2D< Cmpt > &)
 Construct given SphericalTensor. More...
 
 SymmTensor2D (const Cmpt txx, const Cmpt txy, const Cmpt tyy)
 Construct given the three components. More...
 
 SymmTensor2D (Istream &)
 Construct from Istream. More...
 
const Cmpt & xx () const
 
const Cmpt & xy () const
 
const Cmpt & yy () const
 
Cmpt & xx ()
 
Cmpt & xy ()
 
Cmpt & yy ()
 
const SymmTensor2D< Cmpt > & T () const
 Transpose. More...
 
void operator= (const SphericalTensor2D< Cmpt > &)
 Construct given SphericalTensor2D. More...
 
- Public Member Functions inherited from VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 >
 VectorSpace ()
 Construct null. More...
 
 VectorSpace (Istream &)
 Construct from Istream. More...
 
 VectorSpace (const VectorSpace< SymmTensor2D< Cmpt >, Cmpt, nCmpt > &)
 Construct as copy. More...
 
 VectorSpace (const VectorSpace< Form2, Cmpt2, nCmpt > &)
 Construct as copy of another VectorSpace type of the same rank. More...
 
label size () const
 Return the number of elements in the VectorSpace = nCmpt. 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 & operator[] (const direction) const
 
Cmpt & operator[] (const direction)
 
void operator= (const VectorSpace< SymmTensor2D< Cmpt >, Cmpt, nCmpt > &)
 
void operator+= (const VectorSpace< SymmTensor2D< Cmpt >, Cmpt, nCmpt > &)
 
void operator-= (const VectorSpace< SymmTensor2D< Cmpt >, Cmpt, nCmpt > &)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 

Static Public Attributes

static const char *const typeName = "symmTensor2D"
 
static const char * componentNames []
 
static const SymmTensor2D zero
 
static const SymmTensor2D one
 
static const SymmTensor2D max
 
static const SymmTensor2D min
 
static const SymmTensor2D I
 

Additional Inherited Members

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

Detailed Description

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

Templated 2D symmetric tensor derived from VectorSpace adding construction from 4 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 53 of file SymmTensor2D.H.

Member Typedef Documentation

Equivalent type of labels used for valid component indexing.

Definition at line 61 of file SymmTensor2D.H.

Member Enumeration Documentation

anonymous enum
Enumerator
rank 

Definition at line 66 of file SymmTensor2D.H.

enum components

Component labeling enumeration.

Enumerator
XX 
XY 
YY 

Definition at line 85 of file SymmTensor2D.H.

Constructor & Destructor Documentation

SymmTensor2D ( )
inline

Construct null.

Definition at line 37 of file SymmTensor2DI.H.

Referenced by SymmTensor2D< Cmpt >::SymmTensor2D().

Here is the caller graph for this function:

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

Construct given VectorSpace.

Definition at line 43 of file SymmTensor2DI.H.

SymmTensor2D ( const SphericalTensor2D< Cmpt > &  st)
inline

Construct given SphericalTensor.

Definition at line 52 of file SymmTensor2DI.H.

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

Here is the call graph for this function:

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

Construct given the three components.

Definition at line 61 of file SymmTensor2DI.H.

SymmTensor2D ( Istream is)
inline

Construct from Istream.

Definition at line 72 of file SymmTensor2DI.H.

Member Function Documentation

const Cmpt & xx ( ) const
inline
const Cmpt & xy ( ) const
inline
const Cmpt & yy ( ) const
inline
Cmpt & xx ( )
inline
Cmpt & xy ( )
inline
Cmpt & yy ( )
inline
const SymmTensor2D< Cmpt > & T ( ) const
inline

Transpose.

Definition at line 119 of file SymmTensor2DI.H.

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

Member Data Documentation

const char *const typeName = "symmTensor2D"
static

Definition at line 74 of file SymmTensor2D.H.

const char * componentNames
static
Initial value:
=
{
"xx", "xy",
"yy"
}

Definition at line 75 of file SymmTensor2D.H.

const symmTensor2D zero
static

Definition at line 77 of file SymmTensor2D.H.

const symmTensor2D one
static

Definition at line 78 of file SymmTensor2D.H.

const symmTensor2D max
static

Definition at line 79 of file SymmTensor2D.H.

const symmTensor2D min
static

Definition at line 80 of file SymmTensor2D.H.

const symmTensor2D I
static

Definition at line 81 of file SymmTensor2D.H.


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