Loading...
Searching...
No Matches
vectorTensorTransform Class Reference

Vector-tensor class used to perform translations and rotations in 3D space. More...

#include <vectorTensorTransform.H>

Collaboration diagram for vectorTensorTransform:

Public Member Functions

 vectorTensorTransform (const vectorTensorTransform &)=default
 Copy construct.
vectorTensorTransformoperator= (const vectorTensorTransform &)=default
 Copy assignment.
 vectorTensorTransform ()
 Default construct - no translation, identity rotation.
 vectorTensorTransform (const vector &t, const tensor &R, bool hasR=true)
 Construct given a translation vector, rotation tensor and hasR bool.
 vectorTensorTransform (const vector &t)
 Construct a pure translation vectorTensorTransform given a translation vector.
 vectorTensorTransform (const tensor &R)
 Construct a pure rotation vectorTensorTransform given a rotation tensor.
 vectorTensorTransform (Istream &)
 Construct from Istream.
bool hasR () const noexcept
 True if it has a non-identity rotation tensor.
const vectort () const noexcept
 The translation vector.
const tensorR () const noexcept
 The (forward) rotation tensor.
vectort () noexcept
 Non-const access to the translation vector.
tensorR () noexcept
 Non-const access to the rotation tensor. Sets hasR = true.
void checkRotation (const scalar tol=ROOTVSMALL)
 Test for identity rotation and set hasR accordingly.
vector transformPosition (const vector &v) const
 Transform the given position.
pointField transformPosition (const pointField &pts) const
 Transform the given field of points.
void transformPositionList (UList< point > &pts) const
 Inplace transform the given points.
vector invTransformPosition (const vector &v) const
 Inverse transform the given position.
pointField invTransformPosition (const pointField &pts) const
 Inverse transform the given field of points.
void invTransformPositionList (UList< point > &pts) const
 Inplace inverse transform the given points.
template<class Type>
tmp< Field< Type > > transform (const Field< Type > &fld) const
 Transform the given field.
template<class Type>
void transformList (UList< Type > &fld) const
 Inplace transform the given field.
void operator&= (const vectorTensorTransform &)
void operator= (const vector &)
 Assign translation.
void operator+= (const vector &)
void operator-= (const vector &)
void operator= (const tensor &)
void operator&= (const tensor &)

Static Public Attributes

static const char *const typeName
static const vectorTensorTransform zero
static const vectorTensorTransform I

Friends

Istreamoperator>> (Istream &is, vectorTensorTransform &)
Ostreamoperator<< (Ostream &os, const vectorTensorTransform &C)

Detailed Description

Vector-tensor class used to perform translations and rotations in 3D space.

Source files

Definition at line 59 of file vectorTensorTransform.H.

Constructor & Destructor Documentation

◆ vectorTensorTransform() [1/6]

vectorTensorTransform ( const vectorTensorTransform & )
default

Copy construct.

References vectorTensorTransform().

Referenced by operator&=(), operator<<, operator=(), operator>>, transformList(), and vectorTensorTransform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vectorTensorTransform() [2/6]

vectorTensorTransform ( )
inline

Default construct - no translation, identity rotation.

Definition at line 24 of file vectorTensorTransformI.H.

References I, and Foam::Zero.

◆ vectorTensorTransform() [3/6]

vectorTensorTransform ( const vector & t,
const tensor & R,
bool hasR = true )
inline

Construct given a translation vector, rotation tensor and hasR bool.

Definition at line 32 of file vectorTensorTransformI.H.

References hasR(), R(), and t().

Here is the call graph for this function:

◆ vectorTensorTransform() [4/6]

vectorTensorTransform ( const vector & t)
inlineexplicit

Construct a pure translation vectorTensorTransform given a translation vector.

Definition at line 45 of file vectorTensorTransformI.H.

References I, and t().

Here is the call graph for this function:

◆ vectorTensorTransform() [5/6]

vectorTensorTransform ( const tensor & R)
inlineexplicit

Construct a pure rotation vectorTensorTransform given a rotation tensor.

Definition at line 53 of file vectorTensorTransformI.H.

References R(), and Foam::Zero.

Here is the call graph for this function:

◆ vectorTensorTransform() [6/6]

vectorTensorTransform ( Istream & is)
explicit

Construct from Istream.

Definition at line 49 of file vectorTensorTransform.C.

Member Function Documentation

◆ operator=() [1/3]

vectorTensorTransform & operator= ( const vectorTensorTransform & )
default

Copy assignment.

References hasR(), R(), t(), and vectorTensorTransform().

Here is the call graph for this function:

◆ hasR()

bool hasR ( ) const
inlinenoexcept

True if it has a non-identity rotation tensor.

Definition at line 150 of file vectorTensorTransform.H.

References Foam::noexcept.

Referenced by globalIndexAndTransform::addToTransformIndex(), globalIndexAndTransform::globalIndexAndTransform(), Foam::operator&(), operator=(), and vectorTensorTransform().

Here is the caller graph for this function:

◆ t() [1/2]

◆ R() [1/2]

const tensor & R ( ) const
inlinenoexcept

◆ t() [2/2]

vector & t ( )
inlinenoexcept

Non-const access to the translation vector.

Definition at line 168 of file vectorTensorTransform.H.

References Foam::noexcept.

◆ R() [2/2]

Foam::tensor & R ( )
inlinenoexcept

Non-const access to the rotation tensor. Sets hasR = true.

Definition at line 63 of file vectorTensorTransformI.H.

References Foam::noexcept.

◆ checkRotation()

void checkRotation ( const scalar tol = ROOTVSMALL)

Test for identity rotation and set hasR accordingly.

Definition at line 57 of file vectorTensorTransform.C.

References Foam::mag().

Here is the call graph for this function:

◆ transformPosition() [1/2]

Foam::vector transformPosition ( const vector & v) const
inline

Transform the given position.

Definition at line 73 of file vectorTensorTransformI.H.

References R, and t().

Here is the call graph for this function:

◆ transformPosition() [2/2]

Foam::pointField transformPosition ( const pointField & pts) const
inline

Transform the given field of points.

Definition at line 89 of file vectorTensorTransformI.H.

References pts, R, and t().

Here is the call graph for this function:

◆ transformPositionList()

void transformPositionList ( UList< point > & pts) const
inline

Inplace transform the given points.

Definition at line 108 of file vectorTensorTransformI.H.

References p, pts, R, and t().

Here is the call graph for this function:

◆ invTransformPosition() [1/2]

Foam::vector invTransformPosition ( const vector & v) const
inline

Inverse transform the given position.

Definition at line 130 of file vectorTensorTransformI.H.

References R, T, and t().

Here is the call graph for this function:

◆ invTransformPosition() [2/2]

Foam::pointField invTransformPosition ( const pointField & pts) const
inline

Inverse transform the given field of points.

Definition at line 146 of file vectorTensorTransformI.H.

References pts, R, and t().

Here is the call graph for this function:

◆ invTransformPositionList()

void invTransformPositionList ( UList< point > & pts) const
inline

Inplace inverse transform the given points.

Definition at line 165 of file vectorTensorTransformI.H.

References p, pts, R, and t().

Here is the call graph for this function:

◆ transform()

template<class Type>
tmp< Field< Type > > transform ( const Field< Type > & fld) const

Transform the given field.

References fld(), and transform().

Referenced by transform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transformList()

template<class Type>
void transformList ( UList< Type > & fld) const

Inplace transform the given field.

References fld(), transformList(), and vectorTensorTransform().

Referenced by transformList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator&=() [1/2]

void operator&= ( const vectorTensorTransform & tr)
inline

Definition at line 191 of file vectorTensorTransformI.H.

References Foam::tr(), and vectorTensorTransform().

Here is the call graph for this function:

◆ operator=() [2/3]

void operator= ( const vector & t)
inline

Assign translation.

Definition at line 205 of file vectorTensorTransformI.H.

References t().

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const vector & t)
inline

Definition at line 211 of file vectorTensorTransformI.H.

References t().

Here is the call graph for this function:

◆ operator-=()

void operator-= ( const vector & t)
inline

Definition at line 217 of file vectorTensorTransformI.H.

References t().

Here is the call graph for this function:

◆ operator=() [3/3]

void operator= ( const tensor & R)
inline

Definition at line 223 of file vectorTensorTransformI.H.

References R().

Here is the call graph for this function:

◆ operator&=() [2/2]

void operator&= ( const tensor & R)
inline

Definition at line 231 of file vectorTensorTransformI.H.

References R().

Here is the call graph for this function:

◆ operator>>

Istream & operator>> ( Istream & is,
vectorTensorTransform &  )
friend

◆ operator<<

Ostream & operator<< ( Ostream & os,
const vectorTensorTransform & C )
friend

References os(), and vectorTensorTransform().

Member Data Documentation

◆ typeName

const char *const typeName
static
Initial value:
=
"vectorTensorTransform"

Definition at line 86 of file vectorTensorTransform.H.

◆ zero

const Foam::vectorTensorTransform zero
static

Definition at line 88 of file vectorTensorTransform.H.

◆ I

Definition at line 90 of file vectorTensorTransform.H.

Referenced by vectorTensorTransform(), and vectorTensorTransform().


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