Vector-tensor class used to perform translations and rotations in 3D space. More...
Public Member Functions | |
transformer () | |
Construct null (i.e., no transformation) More... | |
transformer (Istream &) | |
Construct from Istream. More... | |
const vector & | t () const |
Return the translation vector. More... | |
bool | translates () const |
Return true if the transformer performs pure translation. More... | |
const tensor & | T () const |
Return the transformation tensor. More... | |
tensor | invT () const |
Return the inverse transformation tensor. More... | |
bool | scales () const |
Return true if the transformer performs pure scaling. More... | |
bool | rotates () const |
Return true if the transformer performs pure rotation. More... | |
bool | transforms () const |
Return true if the transformer transforms a type. More... | |
template<typename Type > | |
bool | transforms () const |
Return true if the transformer transforms the given type. More... | |
bool | transformsPosition () const |
Return true if the transformer transforms a point. More... | |
vector | transformPosition (const vector &v) const |
Transform the given position. More... | |
void | transformPosition (pointField &, const pointField &) const |
Transform the given pointField. More... | |
tmp< pointField > | transformPosition (const pointField &) const |
Transform the given pointField. More... | |
vector | invTransformPosition (const vector &v) const |
Inverse transform the given position. More... | |
void | invTransformPosition (pointField &, const pointField &) const |
Inverse transform the given pointField. More... | |
tmp< pointField > | invTransformPosition (const pointField &) const |
Inverse transform the given pointField. More... | |
template<class Type > | |
Type | transform (const Type &) const |
Transform the given type. More... | |
template<class Type > | |
void | transform (Field< Type > &, const Field< Type > &) const |
Transform the given field. More... | |
template<class Type > | |
tmp< Field< Type > > | transform (const Field< Type > &) const |
Transform the given field. More... | |
template<class Type > | |
tmp< Field< Type > > | transform (const tmp< Field< Type >> &) const |
Transform the given field. More... | |
template<class Type , template< class > class Container> | |
void | transformList (Container< Type > &) const |
Transform the given container. More... | |
template<class Type > | |
Type | invTransform (const Type &) const |
Inverse transform the given type. More... | |
template<class Type > | |
void | invTransform (Field< Type > &, const Field< Type > &) const |
Inverse transform the given field. More... | |
template<class Type > | |
tmp< Field< Type > > | invTransform (const Field< Type > &) const |
Inverse transform the given field. More... | |
template<class Type > | |
tmp< Field< Type > > | invTransform (const tmp< Field< Type >> &) const |
Inverse transform the given field. More... | |
template<class Type , template< class > class Container> | |
void | invTransformList (Container< Type > &) const |
Inverse transform the given container. More... | |
template<> | |
Foam::tmp< Foam::Field< bool > > | transform (const Field< bool > &fld) const |
template<> | |
Foam::tmp< Foam::Field< bool > > | transform (const tmp< Field< bool >> &tfld) const |
template<> | |
Foam::tmp< Foam::Field< Foam::label > > | transform (const Field< label > &fld) const |
template<> | |
Foam::tmp< Foam::Field< Foam::label > > | transform (const tmp< Field< label >> &tfld) const |
template<> | |
Foam::tmp< Foam::Field< Foam::scalar > > | transform (const Field< scalar > &fld) const |
template<> | |
Foam::tmp< Foam::Field< Foam::scalar > > | transform (const tmp< Field< scalar >> &tfld) const |
template<> | |
tmp< Field< bool > > | transform (const Field< bool > &) const |
template<> | |
tmp< Field< bool > > | transform (const tmp< Field< bool >> &) const |
template<> | |
tmp< Field< label > > | transform (const Field< label > &) const |
template<> | |
tmp< Field< label > > | transform (const tmp< Field< label >> &) const |
template<> | |
tmp< Field< scalar > > | transform (const Field< scalar > &) const |
template<> | |
tmp< Field< scalar > > | transform (const tmp< Field< scalar >> &) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | transform (const Field< Type > &fld) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | transform (const tmp< Field< Type >> &tfld) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | invTransform (const Field< Type > &fld) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | invTransform (const tmp< Field< Type >> &tfld) const |
Static Public Member Functions | |
static transformer | translation (const vector &t) |
Construct a pure translation transformer. More... | |
static transformer | scaling (const tensor &T) |
Construct a pure scaling transformer. More... | |
static transformer | rotation (const tensor &T) |
Construct a pure rotation transformer. More... | |
Static Public Attributes | |
static const char *const | typeName |
static const transformer | zero |
static const transformer | I |
static const transformer | null |
Null transformer. More... | |
Friends | |
transformer | inv (const transformer &tr) |
Return the inverse of the given transformer. More... | |
bool | operator== (const transformer &tr1, const transformer &tr2) |
bool | operator!= (const transformer &tr1, const transformer &tr2) |
transformer | operator & (const transformer &tr1, const transformer &tr2) |
Istream & | operator>> (Istream &is, transformer &) |
Ostream & | operator<< (Ostream &os, const transformer &) |
Vector-tensor class used to perform translations and rotations in 3D space.
Definition at line 83 of file transformer.H.
|
inline |
Construct null (i.e., no transformation)
Definition at line 70 of file transformerI.H.
Referenced by Foam::inv(), Foam::operator!=(), transformer::rotation(), transformer::scaling(), and transformer::translation().
transformer | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 58 of file transformer.C.
|
inlinestatic |
Construct a pure translation transformer.
Definition at line 31 of file transformerI.H.
References Tensor< scalar >::I, and transformer::transformer().
Referenced by NamedEnum< compressibleField, 8 >::names().
|
inlinestatic |
Construct a pure scaling transformer.
Definition at line 37 of file transformerI.H.
References transformer::transformer(), and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
|
inlinestatic |
Construct a pure rotation transformer.
Definition at line 43 of file transformerI.H.
References transformer::rotates(), transformer::scales(), transformer::t(), transformer::T(), transformer::transformer(), transformer::translates(), and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
Referenced by particle< Type >::hitSymmetryPatch(), and NamedEnum< compressibleField, 8 >::names().
|
inline |
Return the translation vector.
Definition at line 82 of file transformerI.H.
Referenced by globalIndexAndTransform::globalIndexAndTransform(), Foam::inv(), transformer::invTransformPosition(), Foam::name(), Foam::operator==(), transformer::rotation(), and transformer::transformPosition().
|
inline |
Return true if the transformer performs pure translation.
(i.e. the translation vector is non-zero and the transformation tensor is I)
Definition at line 88 of file transformerI.H.
References transformer::transforms().
Referenced by transformer::rotation().
|
inline |
Return the transformation tensor.
Definition at line 94 of file transformerI.H.
Referenced by globalIndexAndTransform::addToTransformIndex(), PointEdgeWave< Type, TrackingData >::countPatchType(), globalIndexAndTransform::globalIndexAndTransform(), FaceCellWave< Type, TrackingData >::handleAMICyclicPatches(), FaceCellWave< Type, TrackingData >::handleCyclicPatches(), FaceCellWave< Type, TrackingData >::handleProcPatches(), transformer::invT(), transformer::invTransformPosition(), Foam::name(), transformOp< PrimitivePatchType, Type, TrackingData >::operator()(), Foam::operator==(), transformer::rotation(), transformer::transform(), FaceCellWave< Type, TrackingData >::transform(), transformer::transformList(), transformer::transformPosition(), and molecule::transformProperties().
|
inline |
Return the inverse transformation tensor.
Definition at line 100 of file transformerI.H.
References Foam::diag(), Tensor< scalar >::I, transformer::inv, transformer::T(), and Tensor< Cmpt >::T().
Referenced by Foam::inv(), transformer::invTransform(), transformer::invTransformList(), and transformer::invTransformPosition().
|
inline |
Return true if the transformer performs pure scaling.
(i.e. the transformation tensor is diagonal)
Definition at line 121 of file transformerI.H.
Referenced by transformer::rotation().
|
inline |
Return true if the transformer performs pure rotation.
(i.e. the transformation tensor is orthogonal)
Definition at line 127 of file transformerI.H.
Referenced by transformer::rotation().
|
inline |
Return true if the transformer transforms a type.
(i.e. scales or rotates)
Definition at line 133 of file transformerI.H.
Referenced by globalIndexAndTransform::addToTransformIndex(), PointEdgeWave< Type, TrackingData >::countPatchType(), FaceCellWave< Type, TrackingData >::handleAMICyclicPatches(), FaceCellWave< Type, TrackingData >::handleCyclicPatches(), FaceCellWave< Type, TrackingData >::handleProcPatches(), transformer::invTransform(), transformer::invTransformList(), transformer::invTransformPosition(), mapDistribute::transform::operator()(), transformer::transform(), FaceCellWave< Type, TrackingData >::transform(), transformer::transformList(), transformer::transformPosition(), cyclicLduInterfaceField::transforms(), cyclicAMILduInterfaceField::transforms(), processorLduInterfaceField::transforms(), transformer::transforms(), transformer::transformsPosition(), and transformer::translates().
|
inline |
Return true if the transformer transforms the given type.
(i.e. scales or rotates)
Definition at line 140 of file transformerI.H.
References transformer::transforms().
|
inline |
Return true if the transformer transforms a point.
(i.e. translates or scales or rotates)
Definition at line 146 of file transformerI.H.
References transformer::transformPosition(), and transformer::transforms().
Referenced by particle< Type >::correctAfterParallelTransfer(), extendedCellToCellStencil::extendedCellToCellStencil(), extendedCellToFaceStencil::extendedCellToFaceStencil(), extendedFaceToCellStencil::extendedFaceToCellStencil(), FaceCellWave< Type, TrackingData >::handleAMICyclicPatches(), particle< Type >::hitCyclicAMIPatch(), particle< Type >::hitCyclicPatch(), particle< Type >::prepareForInteractionListReferral(), and meshRefinement::selectSeparatedCoupledFaces().
|
inline |
Transform the given position.
Definition at line 153 of file transformerI.H.
References transformer::invTransformPosition(), p, transformer::t(), transformer::T(), and transformer::transforms().
Referenced by Foam::name(), mapDistribute::transformPosition::operator()(), cyclicRepeatAMIPolyPatch::resetAMI(), coupledPolyPatch::ownToNbrOrderData::transform(), transformer::transformPosition(), molecule::transformProperties(), and transformer::transformsPosition().
void transformPosition | ( | pointField & | res, |
const pointField & | pts | ||
) | const |
Transform the given pointField.
Definition at line 77 of file transformer.C.
References transformer::t(), transformer::T(), transformer::transformPosition(), and transformer::transforms().
Foam::tmp< Foam::pointField > transformPosition | ( | const pointField & | pts | ) | const |
Transform the given pointField.
Definition at line 98 of file transformer.C.
References transformer::invTransformPosition(), transformer::t(), transformer::T(), and transformer::transforms().
|
inline |
Inverse transform the given position.
Definition at line 177 of file transformerI.H.
References transformer::invT(), p, transformer::t(), and transformer::transforms().
Referenced by transformer::invTransformPosition(), mapDistribute::transformPosition::operator()(), particle< Type >::prepareForInteractionListReferral(), and transformer::transformPosition().
void invTransformPosition | ( | pointField & | res, |
const pointField & | pts | ||
) | const |
Inverse transform the given pointField.
Definition at line 146 of file transformer.C.
References transformer::t(), transformer::T(), Tensor< Cmpt >::T(), transformer::transform(), and transformer::transforms().
Foam::tmp< Foam::pointField > invTransformPosition | ( | const pointField & | pts | ) | const |
Inverse transform the given pointField.
Definition at line 122 of file transformer.C.
References transformer::invTransformPosition(), transformer::t(), transformer::T(), Tensor< Cmpt >::T(), and transformer::transforms().
Type transform | ( | const Type & | x | ) | const |
Transform the given type.
Definition at line 29 of file transformerTemplates.C.
References transformer::T(), Foam::transform(), transformer::transforms(), and x.
Referenced by Foam::contiguous< transformer >(), particle< Type >::hitCyclicAMIPatch(), transformer::invTransformPosition(), transformer::transform(), cyclicAMILduInterfaceField::transformCoupleField(), cyclicLduInterfaceField::transformCoupleField(), processorLduInterfaceField::transformCoupleField(), solidParticle::transformProperties(), DSMCParcel< ParcelType >::transformProperties(), molecule::transformProperties(), CollidingParcel< ParcelType >::transformProperties(), and KinematicParcel< ParcelType >::transformProperties().
Transform the given field.
Definition at line 44 of file transformerTemplates.C.
References transformer::T(), Foam::transform(), transformer::transform(), and transformer::transforms().
void transformList | ( | Container< Type > & | l | ) | const |
Transform the given container.
Definition at line 91 of file transformerTemplates.C.
References forAllIter, transformer::T(), Foam::transform(), and transformer::transforms().
Referenced by mapDistribute::transform::operator()(), and molecule::transformProperties().
Type invTransform | ( | const Type & | x | ) | const |
Inverse transform the given type.
Definition at line 104 of file transformerTemplates.C.
References transformer::invT(), Foam::transform(), transformer::transforms(), and x.
Referenced by transformer::invTransform().
Inverse transform the given field.
Definition at line 119 of file transformerTemplates.C.
References transformer::invT(), transformer::invTransform(), Foam::transform(), and transformer::transforms().
Inverse transform the given field.
void invTransformList | ( | Container< Type > & | l | ) | const |
Inverse transform the given container.
Definition at line 166 of file transformerTemplates.C.
References forAllIter, transformer::invT(), Foam::transform(), and transformer::transforms().
Referenced by mapDistribute::transform::operator()().
Foam::tmp<Foam::Field<bool> > transform | ( | const Field< bool > & | fld | ) | const |
Definition at line 168 of file transformer.C.
References fld(), and transformer::transform().
Foam::tmp<Foam::Field<bool> > transform | ( | const tmp< Field< bool >> & | tfld | ) | const |
Definition at line 178 of file transformer.C.
References transformer::transform().
Foam::tmp<Foam::Field<Foam::label> > transform | ( | const Field< label > & | fld | ) | const |
Definition at line 188 of file transformer.C.
References fld(), and transformer::transform().
Foam::tmp<Foam::Field<Foam::label> > transform | ( | const tmp< Field< label >> & | tfld | ) | const |
Definition at line 198 of file transformer.C.
References transformer::transform().
Foam::tmp<Foam::Field<Foam::scalar> > transform | ( | const Field< scalar > & | fld | ) | const |
Definition at line 208 of file transformer.C.
References fld(), and transformer::transform().
Foam::tmp<Foam::Field<Foam::scalar> > transform | ( | const tmp< Field< scalar >> & | tfld | ) | const |
Definition at line 218 of file transformer.C.
Foam::tmp<Foam::Field<Type> > transform | ( | const Field< Type > & | fld | ) | const |
Definition at line 58 of file transformerTemplates.C.
References fld(), transformer::T(), Foam::transform(), transformer::transform(), and transformer::transforms().
Foam::tmp<Foam::Field<Type> > transform | ( | const tmp< Field< Type >> & | tfld | ) | const |
Definition at line 75 of file transformerTemplates.C.
References transformer::T(), Foam::transform(), and transformer::transforms().
Foam::tmp<Foam::Field<Type> > invTransform | ( | const Field< Type > & | fld | ) | const |
Definition at line 133 of file transformerTemplates.C.
References fld(), transformer::invT(), transformer::invTransform(), Foam::transform(), and transformer::transforms().
Foam::tmp<Foam::Field<Type> > invTransform | ( | const tmp< Field< Type >> & | tfld | ) | const |
Definition at line 150 of file transformerTemplates.C.
References transformer::invT(), Foam::transform(), and transformer::transforms().
|
friend |
Return the inverse of the given transformer.
Referenced by transformer::invT().
|
friend |
Referenced by Foam::operator!=().
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
Definition at line 121 of file transformer.H.
|
static |
Definition at line 123 of file transformer.H.
|
static |
Definition at line 125 of file transformer.H.
Referenced by cyclicRepeatAMIPolyPatch::resetAMI(), and cyclicAMIPolyPatch::resetAMI().
|
static |
Null transformer.
Definition at line 128 of file transformer.H.
Referenced by processorPolyPatch::transform().