vectorTensorTransform Class Reference

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

Collaboration diagram for vectorTensorTransform:
[legend]

Public Member Functions

 vectorTensorTransform (const vectorTensorTransform &)=default
 Copy construct. More...
 
vectorTensorTransformoperator= (const vectorTensorTransform &)=default
 Copy assignment. More...
 
 vectorTensorTransform ()
 Default construct - no translation, identity rotation. More...
 
 vectorTensorTransform (const vector &t, const tensor &R, bool hasR=true)
 
 vectorTensorTransform (const vector &t)
 
 vectorTensorTransform (const tensor &R)
 
 vectorTensorTransform (Istream &)
 Construct from Istream. More...
 
const vectort () const
 
const tensorR () const
 
bool hasR () const
 
vectort ()
 
tensorR ()
 
vector transformPosition (const vector &v) const
 Transform the given position. More...
 
pointField transformPosition (const pointField &pts) const
 Transform the given pointField. More...
 
vector invTransformPosition (const vector &v) const
 Inverse transform the given position. More...
 
pointField invTransformPosition (const pointField &pts) const
 Inverse transform the given pointField. More...
 
template<class Type >
tmp< Field< Type > > transform (const Field< Type > &) const
 Transform the given field. More...
 
void operator&= (const vectorTensorTransform &)
 
void operator= (const vector &)
 Assign translation. More...
 
void operator+= (const vector &)
 
void operator-= (const vector &)
 
void operator= (const tensor &)
 
void operator&= (const tensor &)
 
template<>
Foam::tmp< Foam::Field< bool > > transform (const Field< bool > &fld) const
 
template<>
Foam::tmp< Foam::Field< Foam::label > > transform (const Field< label > &fld) const
 
template<>
Foam::tmp< Foam::Field< Foam::scalar > > transform (const Field< scalar > &fld) const
 
template<>
tmp< Field< bool > > transform (const Field< bool > &) const
 Template specialisations. More...
 
template<>
tmp< Field< label > > transform (const Field< label > &) const
 
template<>
tmp< Field< scalar > > transform (const Field< scalar > &) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > transform (const Field< Type > &fld) const
 

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 &)
 

Detailed Description

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

Source files

Definition at line 63 of file vectorTensorTransform.H.

Constructor & Destructor Documentation

◆ vectorTensorTransform() [1/6]

Copy construct.

◆ vectorTensorTransform() [2/6]

Default construct - no translation, identity rotation.

Definition at line 30 of file vectorTensorTransformI.H.

◆ 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 39 of file vectorTensorTransformI.H.

◆ vectorTensorTransform() [4/6]

vectorTensorTransform ( const vector t)
inlineexplicit

Construct a pure translation vectorTensorTransform given a translation vector

Definition at line 51 of file vectorTensorTransformI.H.

◆ vectorTensorTransform() [5/6]

vectorTensorTransform ( const tensor R)
inlineexplicit

Construct a pure rotation vectorTensorTransform given a rotation tensor

Definition at line 59 of file vectorTensorTransformI.H.

◆ vectorTensorTransform() [6/6]

vectorTensorTransform ( Istream is)
explicit

Construct from Istream.

Definition at line 55 of file vectorTensorTransform.C.

Member Function Documentation

◆ operator=() [1/3]

vectorTensorTransform& operator= ( const vectorTensorTransform )
default

Copy assignment.

◆ t() [1/2]

const Foam::vector & t ( ) const
inline

Definition at line 69 of file vectorTensorTransformI.H.

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

Here is the caller graph for this function:

◆ R() [1/2]

const Foam::tensor & R ( ) const
inline

Definition at line 75 of file vectorTensorTransformI.H.

Referenced by globalIndexAndTransform::addToTransformIndex(), globalIndexAndTransform::globalIndexAndTransform(), Foam::operator&(), mapDistribute::transform::operator()(), transformOp< PrimitivePatchType, Type, TrackingData >::operator()(), and Foam::operator==().

Here is the caller graph for this function:

◆ hasR()

bool hasR ( ) const
inline

Definition at line 81 of file vectorTensorTransformI.H.

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

Here is the caller graph for this function:

◆ t() [2/2]

Foam::vector & t ( )
inline

Definition at line 87 of file vectorTensorTransformI.H.

◆ R() [2/2]

Foam::tensor & R ( )
inline

Definition at line 93 of file vectorTensorTransformI.H.

◆ transformPosition() [1/2]

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

Transform the given position.

Definition at line 105 of file vectorTensorTransformI.H.

References R.

Referenced by weightedPosition::operator()(), and mapDistribute::transformPosition::operator()().

Here is the caller graph for this function:

◆ transformPosition() [2/2]

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

Transform the given pointField.

Definition at line 121 of file vectorTensorTransformI.H.

References R.

◆ invTransformPosition() [1/2]

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

Inverse transform the given position.

Definition at line 140 of file vectorTensorTransformI.H.

References R, and Foam::T().

Referenced by weightedPosition::operator()(), and mapDistribute::transformPosition::operator()().

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

◆ invTransformPosition() [2/2]

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

Inverse transform the given pointField.

Definition at line 156 of file vectorTensorTransformI.H.

References R.

◆ transform() [1/8]

tmp<Field<Type> > transform ( const Field< Type > &  ) const

Transform the given field.

◆ operator&=() [1/2]

void operator&= ( const vectorTensorTransform tr)
inline

Definition at line 177 of file vectorTensorTransformI.H.

References Foam::tr().

Here is the call graph for this function:

◆ operator=() [2/3]

void operator= ( const vector t)
inline

Assign translation.

Definition at line 190 of file vectorTensorTransformI.H.

◆ operator+=()

void operator+= ( const vector t)
inline

Definition at line 196 of file vectorTensorTransformI.H.

◆ operator-=()

void operator-= ( const vector t)
inline

Definition at line 202 of file vectorTensorTransformI.H.

◆ operator=() [3/3]

void operator= ( const tensor R)
inline

Definition at line 208 of file vectorTensorTransformI.H.

References R.

◆ operator&=() [2/2]

void operator&= ( const tensor R)
inline

Definition at line 216 of file vectorTensorTransformI.H.

References R.

◆ transform() [2/8]

Foam::tmp<Foam::Field<bool> > transform ( const Field< bool > &  fld) const

Definition at line 75 of file vectorTensorTransform.C.

References fld.

◆ transform() [3/8]

Foam::tmp<Foam::Field<Foam::label> > transform ( const Field< label > &  fld) const

Definition at line 83 of file vectorTensorTransform.C.

References fld.

◆ transform() [4/8]

Foam::tmp<Foam::Field<Foam::scalar> > transform ( const Field< scalar > &  fld) const

Definition at line 91 of file vectorTensorTransform.C.

References fld.

◆ transform() [5/8]

tmp<Field<bool> > transform ( const Field< bool > &  ) const

Template specialisations.

◆ transform() [6/8]

tmp<Field<label> > transform ( const Field< label > &  ) const

◆ transform() [7/8]

tmp<Field<scalar> > transform ( const Field< scalar > &  ) const

◆ transform() [8/8]

Foam::tmp<Foam::Field<Type> > transform ( const Field< Type > &  fld) const

Definition at line 32 of file vectorTensorTransformTemplates.C.

References fld, and R.

Friends And Related Function Documentation

◆ operator>>

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

◆ operator<<

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

Member Data Documentation

◆ typeName

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

Definition at line 83 of file vectorTensorTransform.H.

◆ zero

Definition at line 85 of file vectorTensorTransform.H.

◆ I

Definition at line 87 of file vectorTensorTransform.H.


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