Vector-tensor class used to perform translations, rotations and scaling operations 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<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, rotations and scaling operations 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 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, transformer::t(), and transformer::transformer().
|
inlinestatic |
Construct a pure scaling transformer.
Definition at line 37 of file transformerI.H.
References Foam::T(), and VectorSpace< Form, Cmpt, Ncmpts >::zero.
|
inlinestatic |
Construct a pure rotation transformer.
Definition at line 43 of file transformerI.H.
References Foam::T(), and VectorSpace< Form, Cmpt, Ncmpts >::zero.
Referenced by particle::hitSymmetryPatch().
|
inline |
Return the translation vector.
Definition at line 82 of file transformerI.H.
Referenced by globalIndexAndTransform::globalIndexAndTransform(), Foam::operator==(), and transformer::translation().
|
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 transforms.
|
inline |
Return the transformation tensor.
Definition at line 94 of file transformerI.H.
Referenced by globalIndexAndTransform::addToTransformIndex(), globalIndexAndTransform::globalIndexAndTransform(), Foam::operator==(), and transformer::transform().
|
inline |
Return the inverse transformation tensor.
Definition at line 100 of file transformerI.H.
References Foam::diag(), Tensor< scalar >::I, Foam::inv(), and Foam::T().
|
inline |
Return true if the transformer performs pure scaling.
(i.e. the transformation tensor is diagonal)
Definition at line 121 of file transformerI.H.
|
inline |
Return true if the transformer performs pure rotation.
(i.e. the transformation tensor is orthogonal)
Definition at line 127 of file transformerI.H.
|
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(), findCellParticle::hitProcessorPatch(), distributionMap::transform::operator()(), transformer::transform(), cyclicLduInterfaceField::transforms(), and processorLduInterfaceField::transforms().
|
inline |
Return true if the transformer transforms the given type.
(i.e. scales or rotates)
Definition at line 140 of file transformerI.H.
References 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 transforms.
Referenced by particle::correctAfterProcessorTransfer(), extendedCellToCellStencil::extendedCellToCellStencil(), extendedCellToFaceStencil::extendedCellToFaceStencil(), extendedFaceToCellStencil::extendedFaceToCellStencil(), streamlinesParticle::hitCyclicPatch(), particle::hitCyclicPatch(), sampledSetParticle::hitProcessorPatch(), streamlinesParticle::hitProcessorPatch(), particle::prepareForNonConformalCyclicTransfer(), and meshRefinement::selectSeparatedCoupledFaces().
|
inline |
Transform the given position.
Definition at line 152 of file transformerI.H.
References p, Foam::T(), and transforms.
Referenced by cyclicTransform::cyclicTransform(), distributionMap::transformPosition::operator()(), fvMesh::unconform(), and patchToPatch::update().
void transformPosition | ( | pointField & | res, |
const pointField & | pts | ||
) | const |
Transform the given pointField.
Definition at line 76 of file transformer.C.
References Foam::T(), and transforms.
Foam::tmp< Foam::pointField > transformPosition | ( | const pointField & | pts | ) | const |
Transform the given pointField.
Definition at line 97 of file transformer.C.
References Foam::T(), and transforms.
|
inline |
Inverse transform the given position.
Definition at line 176 of file transformerI.H.
References p, and transforms.
void invTransformPosition | ( | pointField & | res, |
const pointField & | pts | ||
) | const |
Inverse transform the given pointField.
Definition at line 145 of file transformer.C.
References Foam::T(), and transforms.
Foam::tmp< Foam::pointField > invTransformPosition | ( | const pointField & | pts | ) | const |
Inverse transform the given pointField.
Definition at line 121 of file transformer.C.
References Foam::T(), and 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 mappedPatchBase::fromNeighbour(), nonConformalCoupledFvPatch::transform(), mappedFvPatchBaseBase::transform(), mappedPatchBaseBase::transform(), nonConformalCoupledPolyPatch::transform(), cyclicLduInterfaceField::transformCoupleField(), processorLduInterfaceField::transformCoupleField(), and fvMesh::unconform().
Transform the given field.
Definition at line 43 of file transformerTemplates.C.
References fld(), Foam::T(), Foam::transform(), and transforms.
void transformList | ( | Container< Type > & | l | ) | const |
Transform the given container.
Definition at line 91 of file transformerTemplates.C.
References forAllIter, Foam::T(), Foam::transform(), and transforms.
Referenced by distributionMap::transform::operator()().
Type invTransform | ( | const Type & | x | ) | const |
Inverse transform the given type.
Definition at line 104 of file transformerTemplates.C.
References Foam::transform(), transforms, and x.
Referenced by fvMesh::unconform().
Inverse transform the given field.
Definition at line 118 of file transformerTemplates.C.
References fld(), Foam::transform(), and 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, Foam::transform(), and transforms.
Definition at line 167 of file transformer.C.
References fld().
Definition at line 177 of file transformer.C.
Definition at line 187 of file transformer.C.
References fld().
Definition at line 197 of file transformer.C.
Definition at line 207 of file transformer.C.
References fld().
Definition at line 217 of file transformer.C.
Foam::tmp<Foam::Field<Type> > transform | ( | const Field< Type > & | fld | ) | const |
Definition at line 57 of file transformerTemplates.C.
References fld(), Foam::T(), Foam::transform(), and transforms.
Foam::tmp<Foam::Field<Type> > transform | ( | const tmp< Field< Type >> & | tfld | ) | const |
Definition at line 74 of file transformerTemplates.C.
References Foam::T(), Foam::transform(), and transforms.
Foam::tmp<Foam::Field<Type> > invTransform | ( | const Field< Type > & | fld | ) | const |
Definition at line 132 of file transformerTemplates.C.
References fld(), Foam::transform(), and transforms.
Foam::tmp<Foam::Field<Type> > invTransform | ( | const tmp< Field< Type >> & | tfld | ) | const |
Definition at line 149 of file transformerTemplates.C.
References Foam::transform(), and transforms.
|
friend |
Return the inverse of the given transformer.
|
friend |
|
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 124 of file transformer.H.
|
static |
Null transformer.
Definition at line 127 of file transformer.H.
Referenced by processorPolyPatch::transform().