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

Tensor< Cmpt > Class Template Reference

Templated 3D tensor derived from VectorSpace adding construction from 9 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 Tensor< Cmpt >:
Collaboration diagram for Tensor< Cmpt >:

List of all members.


Public Types

enum  { rank = 2 }
enum  components {
  XX, XY, XZ, YX,
  YY, YZ, ZX, ZY,
  ZZ
}
 Component labeling enumeration. More...
typedef Tensor< labellabelType
 Equivalent type of labels used for valid component indexing.

Public Member Functions

 Tensor ()
 Construct null.
 Tensor (const VectorSpace< Tensor< Cmpt >, Cmpt, 9 > &)
 Construct given VectorSpace.
 Tensor (const SphericalTensor< Cmpt > &)
 Construct given SphericalTensor.
 Tensor (const SymmTensor< Cmpt > &)
 Construct given SymmTensor.
 Tensor (const Cmpt txx, const Cmpt txy, const Cmpt txz, const Cmpt tyx, const Cmpt tyy, const Cmpt tyz, const Cmpt tzx, const Cmpt tzy, const Cmpt tzz)
 Construct given the nine components.
 Tensor (Istream &)
 Construct from Istream.
const Vector< Cmpt > & x () const
const Vector< Cmpt > & y () const
const Vector< Cmpt > & z () const
Vector< Cmpt > & x ()
Vector< Cmpt > & y ()
Vector< Cmpt > & z ()
const Cmpt & xx () const
const Cmpt & xy () const
const Cmpt & xz () const
const Cmpt & yx () const
const Cmpt & yy () const
const Cmpt & yz () const
const Cmpt & zx () const
const Cmpt & zy () const
const Cmpt & zz () const
Cmpt & xx ()
Cmpt & xy ()
Cmpt & xz ()
Cmpt & yx ()
Cmpt & yy ()
Cmpt & yz ()
Cmpt & zx ()
Cmpt & zy ()
Cmpt & zz ()
Tensor< Cmpt > T () const
 Transpose.
void operator= (const SphericalTensor< Cmpt > &)
 Assign to a SphericalTensor.
void operator= (const SymmTensor< Cmpt > &)
 Assign to a SymmTensor.

Static Public Attributes

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

Detailed Description

template<class Cmpt>
class Foam::Tensor< Cmpt >

Templated 3D tensor derived from VectorSpace adding construction from 9 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 50 of file Tensor.H.


Member Typedef Documentation

Equivalent type of labels used for valid component indexing.

Definition at line 58 of file Tensor.H.


Member Enumeration Documentation

anonymous enum

Enumerator:
rank 

Definition at line 63 of file Tensor.H.

enum components

Component labeling enumeration.

Enumerator:
XX 
XY 
XZ 
YX 
YY 
YZ 
ZX 
ZY 
ZZ 

Definition at line 81 of file Tensor.H.


Constructor & Destructor Documentation

Tensor (  )  [inline]

Construct null.

Definition at line 27 of file TensorI.H.

Tensor ( const VectorSpace< Tensor< Cmpt >, Cmpt, 9 > &  vs  )  [inline]

Construct given VectorSpace.

Definition at line 33 of file TensorI.H.

Tensor ( const SphericalTensor< Cmpt > &  st  )  [inline]

Construct given SphericalTensor.

Definition at line 41 of file TensorI.H.

Tensor ( const Cmpt  txx,
const Cmpt  txy,
const Cmpt  txz,
const Cmpt  tyx,
const Cmpt  tyy,
const Cmpt  tyz,
const Cmpt  tzx,
const Cmpt  tzy,
const Cmpt  tzz 
) [inline]

Construct given the nine components.

Construct from components.

Definition at line 62 of file TensorI.H.


Member Function Documentation

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

Definition at line 85 of file TensorI.H.

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

Definition at line 91 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XX.

const Vector< Cmpt > & z (  )  const [inline]

Definition at line 97 of file TensorI.H.

Vector< Cmpt > & x (  )  [inline]

Definition at line 104 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZX.

Vector< Cmpt > & y (  )  [inline]

Definition at line 110 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XX.

Vector< Cmpt > & z (  )  [inline]

Definition at line 116 of file TensorI.H.

const Cmpt & xx (  )  const [inline]

Definition at line 123 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZX.

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

Here is the caller graph for this function:

const Cmpt & xy (  )  const [inline]

Definition at line 129 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XX.

Referenced by Foam::operator*().

Here is the caller graph for this function:

const Cmpt & xz (  )  const [inline]

Definition at line 135 of file TensorI.H.

Referenced by Foam::operator*().

Here is the caller graph for this function:

const Cmpt & yx (  )  const [inline]

Definition at line 142 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XZ.

const Cmpt & yy (  )  const [inline]

Definition at line 148 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YX.

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

Here is the caller graph for this function:

const Cmpt & yz (  )  const [inline]

Definition at line 154 of file TensorI.H.

Referenced by Foam::operator*().

Here is the caller graph for this function:

const Cmpt & zx (  )  const [inline]

Definition at line 161 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YZ.

const Cmpt & zy (  )  const [inline]

Definition at line 167 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZX.

const Cmpt & zz (  )  const [inline]

Definition at line 173 of file TensorI.H.

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

Here is the caller graph for this function:

Cmpt & xx (  )  [inline]

Definition at line 180 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZZ.

Cmpt & xy (  )  [inline]

Definition at line 186 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XX.

Cmpt & xz (  )  [inline]

Definition at line 192 of file TensorI.H.

Cmpt & yx (  )  [inline]

Definition at line 199 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::XZ.

Cmpt & yy (  )  [inline]

Definition at line 205 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YX.

Cmpt & yz (  )  [inline]

Definition at line 211 of file TensorI.H.

Cmpt & zx (  )  [inline]

Definition at line 218 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::YZ.

Cmpt & zy (  )  [inline]

Definition at line 224 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZX.

Cmpt & zz (  )  [inline]

Definition at line 230 of file TensorI.H.

Tensor< Cmpt > T (  )  const [inline]

Transpose.

Return tensor transpose.

Definition at line 238 of file TensorI.H.

References VectorSpace< Tensor< Cmpt >, Cmpt, 9 >::v_, and Tensor< Cmpt >::ZZ.

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

Assign to a SphericalTensor.

Definition at line 252 of file TensorI.H.

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


Member Data Documentation

const char* const typeName [static]

Definition at line 71 of file Tensor.H.

const char* componentNames[] [static]

Definition at line 72 of file Tensor.H.

const Tensor zero [static]

Definition at line 74 of file Tensor.H.

const Tensor one [static]

Definition at line 75 of file Tensor.H.

const Tensor max [static]

Definition at line 76 of file Tensor.H.

const Tensor min [static]

Definition at line 77 of file Tensor.H.


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