OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

Tensor Class Template Reference

Inheritance diagram for Tensor:

Inheritance graph
[legend]
Collaboration diagram for Tensor:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 63 of file Tensor.H.


Public Types

enum  { rank = 2 }
enum  components {
  XX, XY, XZ, YX,
  YY, YZ, ZX, ZY,
  ZZ
}
 Component labeling enumeration. More...
typedef Tensor< label > labelType
 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 from 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
 Return tensor 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

Member Typedef Documentation

Equivalent type of labels used for valid component indexing.

Definition at line 71 of file Tensor.H.


Member Enumeration Documentation

anonymous enum

Enumerator:
rank 

Definition at line 76 of file Tensor.H.

enum components

Component labeling enumeration.

Enumerator:
XX 
XY 
XZ 
YX 
YY 
YZ 
ZX 
ZY 
ZZ 

Definition at line 92 of file Tensor.H.


Constructor & Destructor Documentation

Tensor (  )  [inline]

Construct null.

Definition at line 41 of file TensorI.H.

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

Construct given VectorSpace.

Definition at line 47 of file TensorI.H.

References SphericalTensor::ii(), VectorSpace::v_, Tensor::XX, Tensor::XY, Tensor::XZ, Tensor::YX, Tensor::YY, Tensor::YZ, Tensor::ZX, Tensor::ZY, and Tensor::ZZ.

Here is the call graph for this function:

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

Construct given SphericalTensor.

Definition at line 55 of file TensorI.H.

Tensor ( const SymmTensor< Cmpt > &   )  [inline]

Construct given SymmTensor.

Definition at line 65 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 from components.

Definition at line 76 of file TensorI.H.

References VectorSpace::v_, Tensor::XX, Tensor::XY, Tensor::XZ, Tensor::YX, Tensor::YY, Tensor::YZ, Tensor::ZX, Tensor::ZY, and Tensor::ZZ.

Tensor ( Istream &   )  [inline]

Construct from Istream.

Definition at line 90 of file TensorI.H.

References VectorSpace::v_, and Tensor::XX.


Member Function Documentation

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

Definition at line 99 of file TensorI.H.

References VectorSpace::v_, and Tensor::YX.

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

Definition at line 105 of file TensorI.H.

References VectorSpace::v_, and Tensor::ZX.

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

Definition at line 111 of file TensorI.H.

References VectorSpace::v_, and Tensor::XX.

Vector< Cmpt > & x (  )  [inline]

Definition at line 118 of file TensorI.H.

References VectorSpace::v_, and Tensor::YX.

Vector< Cmpt > & y (  )  [inline]

Definition at line 124 of file TensorI.H.

References VectorSpace::v_, and Tensor::ZX.

Vector< Cmpt > & z (  )  [inline]

Definition at line 130 of file TensorI.H.

References VectorSpace::v_, and Tensor::XX.

const Cmpt & xx (  )  const [inline]

Definition at line 137 of file TensorI.H.

References VectorSpace::v_, and Tensor::XY.

Referenced by Foam::dev2(), Foam::inv(), Foam::invariantIII(), Foam::operator &&(), Foam::sph(), Tensor::zz(), and DiagTensor::zz().

Here is the caller graph for this function:

const Cmpt & xy (  )  const [inline]

Definition at line 143 of file TensorI.H.

References VectorSpace::v_, and Tensor::XZ.

Referenced by Foam::dev2(), Foam::invariantIII(), Foam::sph(), and DiagTensor::zz().

Here is the caller graph for this function:

const Cmpt & xz (  )  const [inline]

Definition at line 149 of file TensorI.H.

References VectorSpace::v_, and Tensor::YX.

Referenced by Foam::invariantIII(), Foam::sph(), and DiagTensor::zz().

Here is the caller graph for this function:

const Cmpt & yx (  )  const [inline]

Definition at line 156 of file TensorI.H.

References VectorSpace::v_, and Tensor::YY.

Referenced by Foam::sph(), and Tensor::zz().

Here is the caller graph for this function:

const Cmpt & yy (  )  const [inline]

Definition at line 162 of file TensorI.H.

References VectorSpace::v_, and Tensor::YZ.

Referenced by Foam::dev2(), Foam::inv(), and Foam::operator &&().

Here is the caller graph for this function:

const Cmpt & yz (  )  const [inline]

Definition at line 168 of file TensorI.H.

References VectorSpace::v_, and Tensor::ZX.

Referenced by Foam::dev2().

Here is the caller graph for this function:

const Cmpt & zx (  )  const [inline]

Definition at line 175 of file TensorI.H.

References VectorSpace::v_, and Tensor::ZY.

Referenced by Foam::dev2(), Foam::sph(), and Tensor::zz().

Here is the caller graph for this function:

const Cmpt & zy (  )  const [inline]

Definition at line 181 of file TensorI.H.

References VectorSpace::v_, and Tensor::ZZ.

const Cmpt & zz (  )  const [inline]

Definition at line 187 of file TensorI.H.

References VectorSpace::v_, and Tensor::XX.

Referenced by Foam::dev2(), Foam::inv(), and Foam::operator &&().

Here is the caller graph for this function:

Cmpt & xx (  )  [inline]

Definition at line 194 of file TensorI.H.

References VectorSpace::v_, and Tensor::XY.

Cmpt & xy (  )  [inline]

Definition at line 200 of file TensorI.H.

References VectorSpace::v_, and Tensor::XZ.

Cmpt & xz (  )  [inline]

Definition at line 206 of file TensorI.H.

References VectorSpace::v_, and Tensor::YX.

Cmpt & yx (  )  [inline]

Definition at line 213 of file TensorI.H.

References VectorSpace::v_, and Tensor::YY.

Cmpt & yy (  )  [inline]

Definition at line 219 of file TensorI.H.

References VectorSpace::v_, and Tensor::YZ.

Cmpt & yz (  )  [inline]

Definition at line 225 of file TensorI.H.

References VectorSpace::v_, and Tensor::ZX.

Cmpt & zx (  )  [inline]

Definition at line 232 of file TensorI.H.

References VectorSpace::v_, and Tensor::ZY.

Cmpt & zy (  )  [inline]

Definition at line 238 of file TensorI.H.

References VectorSpace::v_, and Tensor::ZZ.

Cmpt & zz (  )  [inline]

Definition at line 244 of file TensorI.H.

References Tensor::xx(), Tensor::yx(), and Tensor::zx().

Here is the call graph for this function:

Tensor< Cmpt > T (  )  const [inline]

Return tensor transpose.

Definition at line 252 of file TensorI.H.

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

Assign to a SphericalTensor.

Definition at line 266 of file TensorI.H.

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

Assign to a SymmTensor.

Definition at line 275 of file TensorI.H.


Member Data Documentation

const char* const typeName [static]

Definition at line 84 of file Tensor.H.

const char* componentNames[] [static]

Definition at line 85 of file Tensor.H.

const Tensor zero [static]

Definition at line 87 of file Tensor.H.

const Tensor one [static]

Definition at line 88 of file Tensor.H.


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