OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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...

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 Cmpt txx, const Cmpt txy, const Cmpt tyx, const Cmpt tyy)
 Construct given the nine components.
 Tensor2D (Istream &)
 Construct from Istream.
const Vector2D< Cmpt > & x () const
const Vector2D< Cmpt > & y () const
Vector2D< Cmpt > & x ()
Vector2D< Cmpt > & y ()
const Cmpt & xx () const
const Cmpt & xy () const
const Cmpt & yx () const
const Cmpt & yy () const
Cmpt & xx ()
Cmpt & xy ()
Cmpt & yx ()
Cmpt & yy ()
Tensor2D< Cmpt > T () const
 Transpose.
void operator= (const SphericalTensor2D< Cmpt > &)
 Construct given SphericalTensor2D.

Static Public Attributes

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

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 49 of file Tensor2D.H.


Member Enumeration Documentation

anonymous enum

Enumerator:
rank 

Definition at line 58 of file Tensor2D.H.

enum components

Component labeling enumeration.

Enumerator:
XX 
XY 
YX 
YY 

Definition at line 76 of file Tensor2D.H.


Constructor & Destructor Documentation

Tensor2D (  )  [inline]

Construct null.

Definition at line 26 of file Tensor2DI.H.

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

Construct given VectorSpace.

Definition at line 31 of file Tensor2DI.H.

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

Construct given SphericalTensor2D.

Definition at line 38 of file Tensor2DI.H.

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

Construct given the nine components.

Definition at line 47 of file Tensor2DI.H.

References SphericalTensor2D< Cmpt >::ii(), VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 >::v_, Tensor2D< Cmpt >::XX, Tensor2D< Cmpt >::XY, Tensor2D< Cmpt >::YX, and Tensor2D< Cmpt >::YY.

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 67 of file Tensor2DI.H.

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

Vector2D< Cmpt > & x (  )  [inline]

Vector2D< Cmpt > & y (  )  [inline]

const Cmpt & xx (  )  const [inline]

Definition at line 93 of file Tensor2DI.H.

References VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 >::v_, and Tensor2D< Cmpt >::YX.

Referenced by Foam::cof(), Foam::operator&&(), and Foam::sph().

Here is the caller graph for this function:

const Cmpt & xy (  )  const [inline]

Definition at line 99 of file Tensor2DI.H.

References VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 >::v_, and Tensor2D< Cmpt >::XX.

Referenced by Foam::cof().

Here is the caller graph for this function:

const Cmpt & yx (  )  const [inline]

Definition at line 105 of file Tensor2DI.H.

Referenced by Foam::cof().

Here is the caller graph for this function:

const Cmpt & yy (  )  const [inline]

Definition at line 111 of file Tensor2DI.H.

Referenced by Foam::cof(), Foam::operator&&(), and Foam::sph().

Here is the caller graph for this function:

Cmpt & xx (  )  [inline]

Cmpt & xy (  )  [inline]

Cmpt & yx (  )  [inline]

Definition at line 130 of file Tensor2DI.H.

Cmpt & yy (  )  [inline]

Definition at line 136 of file Tensor2DI.H.

Tensor2D< Cmpt > T (  )  const [inline]

Transpose.

Definition at line 143 of file Tensor2DI.H.

References VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 >::v_, and Tensor2D< Cmpt >::YY.

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

Construct given SphericalTensor2D.

Definition at line 156 of file Tensor2DI.H.


Member Data Documentation

const char* const typeName [static]

Definition at line 66 of file Tensor2D.H.

const char* componentNames[] [static]

Definition at line 67 of file Tensor2D.H.

const Tensor2D zero [static]

Definition at line 69 of file Tensor2D.H.

const Tensor2D one [static]

Definition at line 70 of file Tensor2D.H.

const Tensor2D max [static]

Definition at line 71 of file Tensor2D.H.

const Tensor2D min [static]

Definition at line 72 of file Tensor2D.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd