Public Types | Public Member Functions | Static Public Attributes
Tensor Class 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:
Inheritance graph
[legend]
Collaboration diagram for Tensor:
Collaboration graph
[legend]

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

Public Member Functions

 Tensor ()
 Construct null. More...
 
template<class Cmpt2 >
 Tensor (const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &)
 Construct given VectorSpace of the same rank. More...
 
 Tensor (const SphericalTensor< Cmpt > &)
 Construct given SphericalTensor. More...
 
 Tensor (const SymmTensor< Cmpt > &)
 Construct given SymmTensor. More...
 
 Tensor (const Vector< Vector< Cmpt > > &)
 Construct given triad. More...
 
 Tensor (const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
 Construct given the three vector components. More...
 
 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. More...
 
 Tensor (Istream &)
 Construct from Istream. More...
 
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 ()
 
Vector< Cmpt > x () const
 
Vector< Cmpt > y () const
 
Vector< Cmpt > z () const
 
Vector< Cmpt > vectorComponent (const direction) const
 
Tensor< Cmpt > T () const
 Transpose. More...
 
void operator= (const SphericalTensor< Cmpt > &)
 Assign to a SphericalTensor. More...
 
void operator= (const SymmTensor< Cmpt > &)
 Assign to a SymmTensor. More...
 
void operator= (const Vector< Vector< Cmpt > > &)
 Assign to a triad. More...
 
template<class Cmpt >
 Tensor ()
 
template<class Cmpt >
 Tensor (const SphericalTensor< Cmpt > &st)
 
template<class Cmpt >
 Tensor (const SymmTensor< Cmpt > &st)
 
template<class Cmpt >
 Tensor (const Vector< Vector< Cmpt > > &tr)
 
template<class Cmpt >
 Tensor (const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
 
template<class Cmpt >
 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)
 
template<class Cmpt >
 Tensor (Istream &is)
 

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
 
static const Tensor I
 

Detailed Description

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 224 of file complexI.H.

Member Typedef Documentation

◆ labelType

Equivalent type of labels used for valid component indexing.

Definition at line 64 of file Tensor.H.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
rank 

Definition at line 69 of file Tensor.H.

◆ components

enum components

Component labeling enumeration.

Enumerator
XX 
XY 
XZ 
YX 
YY 
YZ 
ZX 
ZY 
ZZ 

Definition at line 88 of file Tensor.H.

Constructor & Destructor Documentation

◆ Tensor() [1/15]

Tensor ( )
inline

Construct null.

◆ Tensor() [2/15]

Tensor ( const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &  vs)
inline

Construct given VectorSpace of the same rank.

Definition at line 42 of file TensorI.H.

◆ Tensor() [3/15]

Tensor ( const SphericalTensor< Cmpt > &  )
inline

Construct given SphericalTensor.

◆ Tensor() [4/15]

Tensor ( const SymmTensor< Cmpt > &  )
inline

Construct given SymmTensor.

◆ Tensor() [5/15]

Tensor ( const Vector< Vector< Cmpt > > &  )
inline

Construct given triad.

◆ Tensor() [6/15]

Tensor ( const Vector< Cmpt > &  x,
const Vector< Cmpt > &  y,
const Vector< Cmpt > &  z 
)
inline

Construct given the three vector components.

◆ Tensor() [7/15]

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.

◆ Tensor() [8/15]

Tensor ( Istream )

Construct from Istream.

◆ Tensor() [9/15]

Tensor ( )
inline

Definition at line 36 of file TensorI.H.

◆ Tensor() [10/15]

Tensor ( const SphericalTensor< Cmpt > &  st)
inline

Definition at line 49 of file TensorI.H.

◆ Tensor() [11/15]

Tensor ( const SymmTensor< Cmpt > &  st)
inline

Definition at line 58 of file TensorI.H.

◆ Tensor() [12/15]

Tensor ( const Vector< Vector< Cmpt > > &  tr)
inline

Definition at line 67 of file TensorI.H.

◆ Tensor() [13/15]

Tensor ( const Vector< Cmpt > &  x,
const Vector< Cmpt > &  y,
const Vector< Cmpt > &  z 
)
inline

Definition at line 85 of file TensorI.H.

◆ Tensor() [14/15]

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

Definition at line 99 of file TensorI.H.

◆ Tensor() [15/15]

Tensor ( Istream is)
inline

Definition at line 112 of file TensorI.H.

Member Function Documentation

◆ xx() [1/2]

const Cmpt & xx ( ) const
inline

◆ xy() [1/2]

const Cmpt & xy ( ) const
inline

◆ xz() [1/2]

const Cmpt & xz ( ) const
inline

◆ yx() [1/2]

const Cmpt & yx ( ) const
inline

◆ yy() [1/2]

const Cmpt & yy ( ) const
inline

◆ yz() [1/2]

const Cmpt & yz ( ) const
inline

◆ zx() [1/2]

const Cmpt & zx ( ) const
inline

◆ zy() [1/2]

const Cmpt & zy ( ) const
inline

◆ zz() [1/2]

const Cmpt & zz ( ) const
inline

◆ xx() [2/2]

Cmpt & xx ( )
inline

Definition at line 223 of file TensorI.H.

◆ xy() [2/2]

Cmpt & xy ( )
inline

Definition at line 230 of file TensorI.H.

◆ xz() [2/2]

Cmpt & xz ( )
inline

Definition at line 237 of file TensorI.H.

◆ yx() [2/2]

Cmpt & yx ( )
inline

Definition at line 244 of file TensorI.H.

◆ yy() [2/2]

Cmpt & yy ( )
inline

Definition at line 251 of file TensorI.H.

◆ yz() [2/2]

Cmpt & yz ( )
inline

Definition at line 258 of file TensorI.H.

◆ zx() [2/2]

Cmpt & zx ( )
inline

Definition at line 265 of file TensorI.H.

◆ zy() [2/2]

Cmpt & zy ( )
inline

Definition at line 272 of file TensorI.H.

◆ zz() [2/2]

Cmpt & zz ( )
inline

Definition at line 279 of file TensorI.H.

◆ x()

Vector< Cmpt > x ( ) const
inline

Definition at line 121 of file TensorI.H.

Referenced by axesRotation::e1(), STARCDCoordinateRotation::e1(), EulerCoordinateRotation::e1(), main(), triad::operator=(), and triad::triad().

Here is the caller graph for this function:

◆ y()

Vector< Cmpt > y ( ) const
inline

Definition at line 128 of file TensorI.H.

Referenced by axesRotation::e2(), STARCDCoordinateRotation::e2(), EulerCoordinateRotation::e2(), main(), triad::operator=(), and triad::triad().

Here is the caller graph for this function:

◆ z()

Vector< Cmpt > z ( ) const
inline

Definition at line 135 of file TensorI.H.

Referenced by axesRotation::e3(), STARCDCoordinateRotation::e3(), EulerCoordinateRotation::e3(), main(), triad::operator=(), and triad::triad().

Here is the caller graph for this function:

◆ vectorComponent()

Vector< Cmpt > vectorComponent ( const direction  cmpt) const
inline

Definition at line 142 of file TensorI.H.

◆ T()

Tensor< Cmpt > T ( ) const
inline

◆ operator=() [1/3]

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

Assign to a SphericalTensor.

◆ operator=() [2/3]

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

Assign to a SymmTensor.

◆ operator=() [3/3]

void operator= ( const Vector< Vector< Cmpt > > &  )
inline

Assign to a triad.

Field Documentation

◆ typeName

const char* const typeName
static

Definition at line 77 of file Tensor.H.

◆ componentNames

const char* componentNames[]
static

Definition at line 78 of file Tensor.H.

◆ zero

const Tensor zero
static

◆ one

const Tensor one
static

Definition at line 81 of file Tensor.H.

Referenced by main().

◆ max

const Tensor max
static

Definition at line 82 of file Tensor.H.

◆ min

const Tensor min
static

Definition at line 83 of file Tensor.H.

◆ I

const Tensor I
static

Definition at line 84 of file Tensor.H.

Referenced by cyclicAMIPolyPatch::calcTransforms().


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