Tensor< Cmpt > Class Template Reference

A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace. More...

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

Public Types

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. More...
 
- Public Types inherited from MatrixSpace< Tensor< Cmpt >, Cmpt, 3, 3 >
typedef MatrixSpace< Tensor< Cmpt >, Cmpt, Mrows, Ncols > msType
 MatrixSpace type. More...
 
- Public Types inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols >
typedef VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts > vsType
 VectorSpace type. More...
 
typedef Cmpt cmptType
 Component type. More...
 
typedef Cmpt magType
 Magnitude type. More...
 
typedef Cmpt * iterator
 Random access iterator for traversing VectorSpace. More...
 
typedef const Cmpt * const_iterator
 Random access iterator for traversing VectorSpace. More...
 

Public Member Functions

 Tensor ()=default
 Default construct. More...
 
 Tensor (const Tensor &)=default
 Copy construct. More...
 
Tensoroperator= (const Tensor &)=default
 Copy assignment. More...
 
 Tensor (const Foam::zero)
 Construct initialized to zero. More...
 
template<class Cmpt2 >
 Tensor (const MatrixSpace< Tensor< Cmpt2 >, Cmpt2, 3, 3 > &vs)
 Construct given MatrixSpace of the same rank. More...
 
template<class Cmpt2 >
 Tensor (const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &vs)
 Construct given VectorSpace of the same rank. More...
 
 Tensor (const SphericalTensor< Cmpt > &st)
 Construct given SphericalTensor. More...
 
 Tensor (const SymmTensor< Cmpt > &st)
 Construct given SymmTensor. More...
 
 Tensor (const Vector< Vector< Cmpt >> &vecs, const bool transposed=false)
 Construct given triad of row vectors, optionally treated as transposed (ie, column vectors) More...
 
 Tensor (const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z, const bool transposed=false)
 Construct given the three row vectors, optionally treated as transposed (ie, column vectors) 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...
 
template<template< class, direction, direction > class Block2, direction BRowStart, direction BColStart>
 Tensor (const Block2< Tensor< Cmpt >, BRowStart, BColStart > &block)
 Construct from a block of another matrix space. More...
 
 Tensor (Istream &is)
 Construct from Istream. More...
 
const Cmpt & xx () const noexcept
 
const Cmpt & xy () const noexcept
 
const Cmpt & xz () const noexcept
 
const Cmpt & yx () const noexcept
 
const Cmpt & yy () const noexcept
 
const Cmpt & yz () const noexcept
 
const Cmpt & zx () const noexcept
 
const Cmpt & zy () const noexcept
 
const Cmpt & zz () const noexcept
 
Cmpt & xx () noexcept
 
Cmpt & xy () noexcept
 
Cmpt & xz () noexcept
 
Cmpt & yx () noexcept
 
Cmpt & yy () noexcept
 
Cmpt & yz () noexcept
 
Cmpt & zx () noexcept
 
Cmpt & zy () noexcept
 
Cmpt & zz () noexcept
 
Vector< Cmpt > cx () const
 Extract vector for column 0. More...
 
Vector< Cmpt > cy () const
 Extract vector for column 1. More...
 
Vector< Cmpt > cz () const
 Extract vector for column 2. More...
 
template<direction Idx>
Vector< Cmpt > col () const
 Extract vector for given column: compile-time check of index. More...
 
Vector< Cmpt > col (const direction c) const
 Extract vector for given column (0,1,2): runtime check of index. More...
 
template<direction Idx>
void col (const Vector< Cmpt > &v)
 Set values of given column: compile-time check of index. More...
 
void col (const direction c, const Vector< Cmpt > &v)
 Set values of given column (0,1,2): runtime check of index. More...
 
void cols (const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
 Set column values. More...
 
Vector< Cmpt > x () const
 Extract vector for row 0. More...
 
Vector< Cmpt > y () const
 Extract vector for row 1. More...
 
Vector< Cmpt > z () const
 Extract vector for row 2. More...
 
template<direction Idx>
Vector< Cmpt > row () const
 Extract vector for given row: compile-time check of index. More...
 
Vector< Cmpt > row (const direction r) const
 Extract vector for given row (0,1,2): runtime check of index. More...
 
template<direction Idx>
void row (const Vector< Cmpt > &v)
 Set values of given row: compile-time check of index. More...
 
void row (const direction r, const Vector< Cmpt > &v)
 Set values of given row (0,1,2): runtime check of row. More...
 
void rows (const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
 Set row values. More...
 
Vector< Cmpt > diag () const
 Extract the diagonal as a vector. More...
 
void diag (const Vector< Cmpt > &v)
 Set values of the diagonal. More...
 
void addDiag (const Vector< Cmpt > &v)
 Add to the diagonal. More...
 
void subtractDiag (const Vector< Cmpt > &v)
 Subtract from the diagonal. More...
 
scalar diagSqr () const
 The L2-norm squared of the diagonal. More...
 
bool is_identity (const scalar tol=ROOTVSMALL) const
 Is identity tensor? More...
 
Tensor< Cmpt > T () const
 Return non-Hermitian transpose. More...
 
Cmpt det () const
 The determinate. More...
 
Cmpt det2D (const direction excludeCmpt) const
 The 2D determinant by excluding given direction. More...
 
Tensor< Cmpt > adjunct () const
 Return adjunct matrix (transpose of cofactor matrix) More...
 
Tensor< Cmpt > cof () const
 Return cofactor matrix (transpose of adjunct matrix) More...
 
Tensor< Cmpt > adjunct2D (const direction excludeCmpt) const
 Return 2D adjunct matrix by excluding given direction. More...
 
Tensor< Cmpt > inv () const
 Return inverse. More...
 
Tensor< Cmpt > safeInv () const
 Return inverse, with (ad hoc) failsafe handling of 2D tensors. More...
 
Tensor< Cmpt > inv2D (const direction excludeCmpt) const
 Return inverse of 2D tensor (by excluding given direction) More...
 
Tensor< Cmpt > inner (const Tensor< Cmpt > &t2) const
 Inner-product of this with another Tensor. More...
 
Tensor< Cmpt > schur (const Tensor< Cmpt > &t2) const
 Schur-product of this with another Tensor. More...
 
void operator &= (const Tensor< Cmpt > &t)
 Assign inner-product of this with another Tensor. More...
 
template<class Cmpt2 >
void operator= (const VectorSpace< Tensor< Cmpt2 >, Cmpt2, 9 > &)
 Assign to an equivalent vector space. 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 of row vectors. More...
 
Vector< Cmpt > vectorComponent (const direction cmpt) const
 Deprecated(2018-12) Return vector for given row (0,1) More...
 
template<>
const Foam::Tensor< float > I (1, 0, 0, 0, 1, 0, 0, 0, 1)
 
template<>
const Foam::Tensor< double > I (1, 0, 0, 0, 1, 0, 0, 0, 1)
 
template<Foam::direction Idx>
Foam::Vector< Cmpt > col () const
 
template<Foam::direction Idx>
Foam::Vector< Cmpt > row () const
 
- Public Member Functions inherited from MatrixSpace< Tensor< Cmpt >, Cmpt, 3, 3 >
 MatrixSpace ()=default
 Default construct. More...
 
 MatrixSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 MatrixSpace (const VectorSpace< Form2, Cmpt2, Mrows *Ncols > &)
 Construct as copy of a VectorSpace with the same size. More...
 
 MatrixSpace (const Block2< Tensor< Cmpt >, BRowStart, BColStart > &block)
 Construct from a block of another matrix space. More...
 
 MatrixSpace (Istream &is)
 Construct from Istream. More...
 
const Cmpt & elmt () const noexcept
 Fast const element access using compile-time addressing. More...
 
Cmpt & elmt () noexcept
 Fast element access using compile-time addressing. More...
 
const Cmpt & xx () const noexcept
 
Cmpt & xx () noexcept
 
const Cmpt & xy () const noexcept
 
Cmpt & xy () noexcept
 
const Cmpt & xz () const noexcept
 
Cmpt & xz () noexcept
 
const Cmpt & yx () const noexcept
 
Cmpt & yx () noexcept
 
const Cmpt & yy () const noexcept
 
Cmpt & yy () noexcept
 
const Cmpt & yz () const noexcept
 
Cmpt & yz () noexcept
 
const Cmpt & zx () const noexcept
 
Cmpt & zx () noexcept
 
const Cmpt & zy () const noexcept
 
Cmpt & zy () noexcept
 
const Cmpt & zz () const noexcept
 
Cmpt & zz () noexcept
 
typeOfTranspose< Cmpt, Tensor< Cmpt > >::type T () const
 Return the transpose of the matrix. More...
 
ConstBlock< SubTensor, BRowStart, BColStart > block () const
 Return a const sub-block corresponding to the specified type. More...
 
Block< SubTensor, BRowStart, BColStart > block ()
 Return a sub-block corresponding to the specified type. More...
 
Foam::MatrixSpace< Tensor< Cmpt >, Cmpt, Mrows, Ncols >::template ConstBlock< SubTensor, BRowStart, BColStart > block () const
 
Foam::MatrixSpace< Tensor< Cmpt >, Cmpt, Mrows, Ncols >::template Block< SubTensor, BRowStart, BColStart > block ()
 
const Cmpt & operator() (const direction &i, const direction &j) const
 (i, j) const element access operator More...
 
Cmpt & operator() (const direction &i, const direction &j)
 (i, j) element access operator More...
 
void operator= (const Foam::zero)
 Assignment to zero. More...
 
void operator= (const Block2< Tensor< Cmpt >, BRowStart, BColStart > &block)
 Assignment to a block of another matrix space. More...
 
void operator&= (const MatrixSpace< Tensor< Cmpt >, Cmpt, Ncols, Ncols > &matrix)
 Inner product with a compatible square matrix. More...
 
- Public Member Functions inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols >
 VectorSpace ()=default
 Default construct. More...
 
 VectorSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 VectorSpace (const VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts > &vs)
 Copy construct. More...
 
 VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &)
 Copy construct of a VectorSpace with the same size. More...
 
 VectorSpace (Istream &is)
 Construct from Istream. More...
 
const Cmpt & component (const direction) const
 
Cmpt & component (const direction)
 
void component (Cmpt &, const direction) const
 
void replace (const direction, const Cmpt &)
 
const Cmpt * cdata () const noexcept
 Return const pointer to the first data element. More...
 
Cmpt * data () noexcept
 Return pointer to the first data element. More...
 
const ConstBlock< SubVector, BStart > block () const
 
const Foam::VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 
const Cmpt & operator[] (const direction) const
 
Cmpt & operator[] (const direction)
 
void operator= (const VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts > &)
 
void operator= (const Foam::zero)
 
void operator+= (const VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts > &)
 
void operator-= (const VectorSpace< Tensor< Cmpt >, Cmpt, Ncmpts > &)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 
iterator begin () noexcept
 Return an iterator to begin of VectorSpace. More...
 
const_iterator begin () const noexcept
 Return const_iterator to begin of VectorSpace. More...
 
iterator end () noexcept
 Return an iterator to end of VectorSpace. More...
 
const_iterator end () const noexcept
 Return const_iterator to end of VectorSpace. More...
 
const_iterator cbegin () const noexcept
 Return const_iterator to begin of VectorSpace. More...
 
const_iterator cend () const noexcept
 Return const_iterator to end of VectorSpace. More...
 

Static Public Attributes

static constexpr direction rank = 2
 Rank of Tensor is 2. More...
 
static const Tensor I
 
- Static Public Attributes inherited from MatrixSpace< Tensor< Cmpt >, Cmpt, 3, 3 >
static constexpr direction mRows
 
static constexpr direction nCols
 
- Static Public Attributes inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols >
static constexpr direction dim
 Dimensionality of space. More...
 
static constexpr direction nComponents
 Number of components in this vector space. More...
 
static constexpr direction mRows
 
static constexpr direction nCols
 
static const char *const typeName
 
static const char *const componentNames []
 
static const Tensor< Cmpt > zero
 
static const Tensor< Cmpt > one
 
static const Tensor< Cmpt > max
 
static const Tensor< Cmpt > min
 
static const Tensor< Cmpt > rootMax
 
static const Tensor< Cmpt > rootMin
 

Additional Inherited Members

- Static Public Member Functions inherited from MatrixSpace< Tensor< Cmpt >, Cmpt, 3, 3 >
static direction m () noexcept
 The number of rows. More...
 
static direction n () noexcept
 The number of columns. More...
 
static msType identity ()
 An identity matrix for square matrix-spaces. More...
 
- Static Public Member Functions inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols >
static constexpr direction size () noexcept
 The number of elements in the VectorSpace = Ncmpts. More...
 
static Tensor< Cmpt > uniform (const Cmpt &s)
 Return a VectorSpace with all elements = s. More...
 
- Public Attributes inherited from VectorSpace< Tensor< Cmpt >, Cmpt, Mrows *Ncols >
Cmpt v_ [Ncmpts]
 The components of this vector space. More...
 

Detailed Description

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

A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.

Source files
See also
Foam::MatrixSpace Foam::Vector

Definition at line 266 of file complexI.H.

Member Typedef Documentation

◆ labelType

typedef Tensor<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 68 of file Tensor.H.

Member Enumeration Documentation

◆ components

enum components

Component labeling enumeration.

Enumerator
XX 
XY 
XZ 
YX 
YY 
YZ 
ZX 
ZY 
ZZ 

Definition at line 87 of file Tensor.H.

Constructor & Destructor Documentation

◆ Tensor() [1/12]

Tensor ( )
default

Default construct.

◆ Tensor() [2/12]

Tensor ( const Tensor< Cmpt > &  )
default

Copy construct.

◆ Tensor() [3/12]

Tensor ( const Foam::zero  )
inline

Construct initialized to zero.

Definition at line 29 of file TensorI.H.

◆ Tensor() [4/12]

Tensor ( const MatrixSpace< Tensor< Cmpt2 >, Cmpt2, 3, 3 > &  vs)
inline

Construct given MatrixSpace of the same rank.

Definition at line 38 of file TensorI.H.

◆ Tensor() [5/12]

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

Construct given VectorSpace of the same rank.

Definition at line 49 of file TensorI.H.

◆ Tensor() [6/12]

Tensor ( const SphericalTensor< Cmpt > &  st)
inline

Construct given SphericalTensor.

Definition at line 58 of file TensorI.H.

◆ Tensor() [7/12]

Tensor ( const SymmTensor< Cmpt > &  st)
inline

Construct given SymmTensor.

Definition at line 67 of file TensorI.H.

◆ Tensor() [8/12]

Tensor ( const Vector< Vector< Cmpt >> &  vecs,
const bool  transposed = false 
)
inline

Construct given triad of row vectors, optionally treated as transposed (ie, column vectors)

Definition at line 77 of file TensorI.H.

◆ Tensor() [9/12]

Tensor ( const Vector< Cmpt > &  x,
const Vector< Cmpt > &  y,
const Vector< Cmpt > &  z,
const bool  transposed = false 
)
inline

Construct given the three row vectors, optionally treated as transposed (ie, column vectors)

Definition at line 88 of file TensorI.H.

◆ Tensor() [10/12]

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.

Definition at line 108 of file TensorI.H.

◆ Tensor() [11/12]

Tensor ( const Block2< Tensor< Cmpt >, BRowStart, BColStart > &  block)
inline

Construct from a block of another matrix space.

Definition at line 128 of file TensorI.H.

◆ Tensor() [12/12]

Tensor ( Istream is)
inlineexplicit

Construct from Istream.

Definition at line 137 of file TensorI.H.

Member Function Documentation

◆ operator=() [1/5]

Tensor& operator= ( const Tensor< Cmpt > &  )
default

Copy assignment.

◆ xx() [1/2]

◆ xy() [1/2]

◆ xz() [1/2]

◆ yx() [1/2]

◆ yy() [1/2]

◆ yz() [1/2]

◆ zx() [1/2]

◆ zy() [1/2]

◆ zz() [1/2]

◆ xx() [2/2]

Cmpt& xx ( )
inlinenoexcept

Definition at line 203 of file Tensor.H.

◆ xy() [2/2]

Cmpt& xy ( )
inlinenoexcept

Definition at line 204 of file Tensor.H.

◆ xz() [2/2]

Cmpt& xz ( )
inlinenoexcept

Definition at line 205 of file Tensor.H.

◆ yx() [2/2]

Cmpt& yx ( )
inlinenoexcept

Definition at line 206 of file Tensor.H.

◆ yy() [2/2]

Cmpt& yy ( )
inlinenoexcept

Definition at line 207 of file Tensor.H.

◆ yz() [2/2]

Cmpt& yz ( )
inlinenoexcept

Definition at line 208 of file Tensor.H.

◆ zx() [2/2]

Cmpt& zx ( )
inlinenoexcept

Definition at line 209 of file Tensor.H.

◆ zy() [2/2]

Cmpt& zy ( )
inlinenoexcept

Definition at line 210 of file Tensor.H.

◆ zz() [2/2]

Cmpt& zz ( )
inlinenoexcept

Definition at line 211 of file Tensor.H.

◆ cx()

Foam::Vector< Cmpt > cx ( ) const
inline

Extract vector for column 0.

Definition at line 167 of file TensorI.H.

◆ cy()

Foam::Vector< Cmpt > cy ( ) const
inline

Extract vector for column 1.

Definition at line 174 of file TensorI.H.

◆ cz()

Foam::Vector< Cmpt > cz ( ) const
inline

Extract vector for column 2.

Definition at line 181 of file TensorI.H.

◆ col() [1/5]

Vector<Cmpt> col ( ) const
inline

Extract vector for given column: compile-time check of index.

◆ col() [2/5]

Foam::Vector< Cmpt > col ( const direction  c) const
inline

Extract vector for given column (0,1,2): runtime check of index.

Definition at line 201 of file TensorI.H.

◆ col() [3/5]

void col ( const Vector< Cmpt > &  v)
inline

Set values of given column: compile-time check of index.

Definition at line 249 of file TensorI.H.

◆ col() [4/5]

void col ( const direction  c,
const Vector< Cmpt > &  v 
)
inline

Set values of given column (0,1,2): runtime check of index.

Definition at line 325 of file TensorI.H.

◆ cols()

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

Set column values.

Definition at line 297 of file TensorI.H.

◆ x()

Foam::Vector< Cmpt > x ( ) const
inline

Extract vector for row 0.

Definition at line 146 of file TensorI.H.

◆ y()

Foam::Vector< Cmpt > y ( ) const
inline

Extract vector for row 1.

Definition at line 153 of file TensorI.H.

◆ z()

Foam::Vector< Cmpt > z ( ) const
inline

Extract vector for row 2.

Definition at line 160 of file TensorI.H.

◆ row() [1/5]

Vector<Cmpt> row ( ) const
inline

Extract vector for given row: compile-time check of index.

Referenced by Tensor< scalar >::vectorComponent().

Here is the caller graph for this function:

◆ row() [2/5]

Foam::Vector< Cmpt > row ( const direction  r) const
inline

Extract vector for given row (0,1,2): runtime check of index.

Definition at line 231 of file TensorI.H.

◆ row() [3/5]

void row ( const Vector< Cmpt > &  v)
inline

Set values of given row: compile-time check of index.

Definition at line 276 of file TensorI.H.

◆ row() [4/5]

void row ( const direction  r,
const Vector< Cmpt > &  v 
)
inline

Set values of given row (0,1,2): runtime check of row.

Definition at line 344 of file TensorI.H.

◆ rows()

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

Set row values.

Definition at line 311 of file TensorI.H.

◆ diag() [1/2]

Foam::Vector< Cmpt > diag ( ) const
inline

Extract the diagonal as a vector.

Definition at line 362 of file TensorI.H.

◆ diag() [2/2]

void diag ( const Vector< Cmpt > &  v)
inline

Set values of the diagonal.

Definition at line 369 of file TensorI.H.

◆ addDiag()

void addDiag ( const Vector< Cmpt > &  v)
inline

Add to the diagonal.

Definition at line 376 of file TensorI.H.

◆ subtractDiag()

void subtractDiag ( const Vector< Cmpt > &  v)
inline

Subtract from the diagonal.

Definition at line 383 of file TensorI.H.

◆ diagSqr()

Foam::scalar diagSqr ( ) const
inline

The L2-norm squared of the diagonal.

Definition at line 390 of file TensorI.H.

◆ is_identity()

bool is_identity ( const scalar  tol = ROOTVSMALL) const
inline

Is identity tensor?

Definition at line 402 of file TensorI.H.

◆ T()

Foam::Tensor< Cmpt > T ( ) const
inline

Return non-Hermitian transpose.

Definition at line 419 of file TensorI.H.

◆ det()

Cmpt det ( ) const
inline

The determinate.

Definition at line 431 of file TensorI.H.

Referenced by Foam::det(), and Tensor< scalar >::safeInv().

Here is the caller graph for this function:

◆ det2D()

Cmpt det2D ( const direction  excludeCmpt) const
inline

The 2D determinant by excluding given direction.

Definition at line 443 of file TensorI.H.

◆ adjunct()

Foam::Tensor< Cmpt > adjunct ( ) const
inline

Return adjunct matrix (transpose of cofactor matrix)

Definition at line 464 of file TensorI.H.

Referenced by Foam::inv(), and Tensor< scalar >::safeInv().

Here is the caller graph for this function:

◆ cof()

Foam::Tensor< Cmpt > cof ( ) const
inline

Return cofactor matrix (transpose of adjunct matrix)

Definition at line 476 of file TensorI.H.

Referenced by Foam::cof().

Here is the caller graph for this function:

◆ adjunct2D()

Foam::Tensor< Cmpt > adjunct2D ( const direction  excludeCmpt) const
inline

Return 2D adjunct matrix by excluding given direction.

Definition at line 484 of file TensorI.H.

◆ inv()

Foam::Tensor< Cmpt > inv ( ) const
inline

Return inverse.

Definition at line 573 of file TensorI.H.

Referenced by Foam::inv().

Here is the caller graph for this function:

◆ safeInv()

Foam::Tensor< Cmpt > safeInv ( ) const
inline

Return inverse, with (ad hoc) failsafe handling of 2D tensors.

Definition at line 593 of file TensorI.H.

◆ inv2D()

Foam::Tensor< Cmpt > inv2D ( const direction  excludeCmpt) const
inline

Return inverse of 2D tensor (by excluding given direction)

Definition at line 523 of file TensorI.H.

◆ inner()

Foam::Tensor< Cmpt > inner ( const Tensor< Cmpt > &  t2) const
inline

Inner-product of this with another Tensor.

Definition at line 535 of file TensorI.H.

Referenced by Foam::operator &().

Here is the caller graph for this function:

◆ schur()

Foam::Tensor< Cmpt > schur ( const Tensor< Cmpt > &  t2) const
inline

Schur-product of this with another Tensor.

Definition at line 558 of file TensorI.H.

◆ operator &=()

void operator&= ( const Tensor< Cmpt > &  t)
inline

Assign inner-product of this with another Tensor.

◆ operator=() [2/5]

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

Assign to an equivalent vector space.

Definition at line 661 of file TensorI.H.

◆ operator=() [3/5]

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

Assign to a SphericalTensor.

Definition at line 670 of file TensorI.H.

◆ operator=() [4/5]

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

Assign to a SymmTensor.

Definition at line 679 of file TensorI.H.

◆ operator=() [5/5]

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

Assign to a triad of row vectors.

Definition at line 688 of file TensorI.H.

◆ vectorComponent()

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

Deprecated(2018-12) Return vector for given row (0,1)

Deprecated:
(2018-12) use row() method

Definition at line 449 of file Tensor.H.

◆ I() [1/2]

const Foam::Tensor< float > I ( ,
,
,
,
,
,
,
,
 
)

◆ I() [2/2]

const Foam::Tensor< double > I ( ,
,
,
,
,
,
,
,
 
)

◆ col() [5/5]

Foam::Vector<Cmpt> col ( ) const
inline

Definition at line 189 of file TensorI.H.

◆ row() [5/5]

Foam::Vector<Cmpt> row ( ) const
inline

Definition at line 219 of file TensorI.H.

Member Data Documentation

◆ rank

constexpr direction rank = 2
static

Rank of Tensor is 2.

Definition at line 76 of file Tensor.H.

◆ I

const Foam::labelTensor I
static

Definition at line 81 of file Tensor.H.


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