FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

Tensor2D< Cmpt > Class Template Reference

Templated 2D tensor derived from VectorSpace adding construction from 4 components, element access using xx(), xy(), yx() and yy() member functions and the iner-product (dot-product) and outer-product of two Vector2Ds (tensor-product) operators. More...

#include <OpenFOAM/Tensor2D_.H>


Detailed Description

template<class Cmpt>
class Foam::Tensor2D< Cmpt >

Templated 2D tensor derived from VectorSpace adding construction from 4 components, element access using xx(), xy(), yx() and yy() member functions and the iner-product (dot-product) and outer-product of two Vector2Ds (tensor-product) operators.

Source files

Definition at line 54 of file Tensor2D_.H.

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

List of all members.

Public Types

enum  { rank = 2 }
enum  components { XX, XY, YX, YY }
 

Component labeling enumeration.

More...

Public Member Functions

 Tensor2D ()
 Construct null.
 Tensor2D (const VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 > &)
 Construct given VectorSpace.
 Tensor2D (const SphericalTensor2D< Cmpt > &)
 Construct given SphericalTensor2D.
 Tensor2D (const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
 Construct given the two vectors.
 Tensor2D (const Cmpt txx, const Cmpt txy, const Cmpt tyx, const Cmpt tyy)
 Construct given the four components.
 Tensor2D (Istream &)
 Construct from Istream.
const Cmpt &  xx () const
const Cmpt &  xy () const
const Cmpt &  yx () const
const Cmpt &  yy () const
Cmpt &  xx ()
Cmpt &  xy ()
Cmpt &  yx ()
Cmpt &  yy ()
const Vector2D< Cmpt >  x () const
const Vector2D< Cmpt >  y () const
Tensor2D< Cmpt >  T () const
 Transpose.
void  operator= (const SphericalTensor2D< Cmpt > &)
 Copy SphericalTensor2D.

Static Public Attributes

static const char *const  typeName = "tensor2D"
static const char *  componentNames []
static const Tensor2D  zero
static const Tensor2D  one
static const Tensor2D  max
static const Tensor2D  min

Member Enumeration Documentation

anonymous enum
Enumerator:
rank 

Definition at line 63 of file Tensor2D_.H.

enum components

Component labeling enumeration.

Enumerator:
XX 
XY 
YX 
YY 

Definition at line 81 of file Tensor2D_.H.


Constructor & Destructor Documentation

Tensor2D (  ) [inline]

Construct null.

Definition at line 34 of file Tensor2DI_.H.

Tensor2D ( const VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 > &   vs  ) [inline]

Construct given VectorSpace.

Definition at line 39 of file Tensor2DI_.H.

Tensor2D ( const SphericalTensor2D< Cmpt > &   st  ) [inline]

Construct given SphericalTensor2D.

Definition at line 46 of file Tensor2DI_.H.

References SphericalTensor2D< Cmpt >::ii().

Tensor2D ( const Vector2D< Cmpt > &   x,
const Vector2D< Cmpt > &   y  
) [inline]

Construct given the two vectors.

Definition at line 55 of file Tensor2DI_.H.

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

Tensor2D ( const Cmpt   txx,
const Cmpt   txy,
const Cmpt   tyx,
const Cmpt   tyy  
) [inline]

Construct given the four components.

Definition at line 67 of file Tensor2DI_.H.

Tensor2D ( Istream &   is  ) [inline]

Construct from Istream.

Definition at line 78 of file Tensor2DI_.H.


Member Function Documentation

Cmpt & xx (  ) [inline]

Definition at line 125 of file Tensor2DI_.H.

Cmpt & xy (  ) [inline]

Definition at line 131 of file Tensor2DI_.H.

Cmpt & yx (  ) [inline]

Definition at line 137 of file Tensor2DI_.H.

Cmpt & yy (  ) [inline]

Definition at line 143 of file Tensor2DI_.H.

const Vector2D< Cmpt > x (  ) const [inline]

Definition at line 87 of file Tensor2DI_.H.

const Vector2D< Cmpt > y (  ) const [inline]

Definition at line 93 of file Tensor2DI_.H.

Tensor2D< Cmpt > T (  ) const [inline]

Transpose.

Definition at line 150 of file Tensor2DI_.H.

References xx.

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

Copy SphericalTensor2D.

Definition at line 163 of file Tensor2DI_.H.

References SphericalTensor2D< Cmpt >::ii().


Member Data Documentation

const char *const typeName = "tensor2D" [static]

Definition at line 71 of file Tensor2D_.H.

const char * componentNames [static]
Initial value:
{
    "xx", "xy",
    "yx", "yy"
}

Definition at line 72 of file Tensor2D_.H.

const tensor2D zero [static]

Definition at line 74 of file Tensor2D_.H.

const tensor2D one [static]

Definition at line 75 of file Tensor2D_.H.

const tensor2D max [static]

Definition at line 76 of file Tensor2D_.H.

const tensor2D min [static]

Definition at line 77 of file Tensor2D_.H.


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