Determination and storage of the possible independent transforms introduced by coupledPolyPatches, as well as all of the possible permutations of these transforms generated by the presence of multiple coupledPolyPatches, i.e. more than one cyclic boundary. Note that any given point can be on maximum 3 transforms only (and these transforms have to be perpendicular) More...
Classes | |
class | less |
Less function class used in sorting encoded transforms and indices. More... | |
Public Member Functions | |
ClassName ("globalIndexAndTransform") | |
globalIndexAndTransform (const polyMesh &mesh) | |
Construct from components. More... | |
globalIndexAndTransform (const globalIndexAndTransform &)=delete | |
Disallow default bitwise copy construction. More... | |
label | encodeTransformIndex (const labelList &permutationIndices) const |
Generate a transform index from the permutation indices of. More... | |
labelList | decodeTransformIndex (const label transformIndex) const |
Decode transform index. More... | |
label | addToTransformIndex (const label transformIndex, const label patchi, const bool isSendingSide=true, const scalar tol=small) const |
Add patch transformation to transformIndex. Return new. More... | |
label | mergeTransformIndex (const label transformIndex0, const label transformIndex1) const |
Combine two transformIndices. More... | |
label | minimumTransformIndex (const label transformIndex0, const label transformIndex1) const |
Combine two transformIndices. More... | |
label | subtractTransformIndex (const label transformIndex0, const label transformIndex1) const |
Subtract two transformIndices. More... | |
labelPair | encode (const label index, const label transformIndex) const |
Encode index and bare index as components on own processor. More... | |
labelPair | encode (const label proci, const label index, const label transformIndex) const |
Encode index and bare index as components on given processor. More... | |
label | index (const labelPair &globalIAndTransform) const |
Index carried by the object. More... | |
label | processor (const labelPair &globalIAndTransform) const |
Which processor does this come from? More... | |
label | transformIndex (const labelPair &globalIAndTransform) const |
Transform carried by the object. More... | |
label | nIndependentTransforms () const |
Return the number of independent transforms. More... | |
const List< transformer > & | transforms () const |
Return access to the stored independent transforms. More... | |
const List< transformer > & | transformPermutations () const |
Return access to the permuted transforms. More... | |
label | nullTransformIndex () const |
Return the transformIndex (index in transformPermutations) More... | |
const List< labelPair > & | patchTransformSign () const |
Return access to the per-patch transform-sign pairs. More... | |
const transformer & | transform (label transformIndex) const |
Access the overall (permuted) transform corresponding. More... | |
labelList | transformIndicesForPatches (const labelHashSet &patchIs) const |
Access the all of the indices of the transform. More... | |
pointField | transformPatches (const labelHashSet &patchIs, const point &pt) const |
Apply all of the transform permutations. More... | |
void | operator= (const globalIndexAndTransform &)=delete |
Disallow default bitwise assignment. More... | |
Determination and storage of the possible independent transforms introduced by coupledPolyPatches, as well as all of the possible permutations of these transforms generated by the presence of multiple coupledPolyPatches, i.e. more than one cyclic boundary. Note that any given point can be on maximum 3 transforms only (and these transforms have to be perpendicular)
Also provides global index encoding and decoding for entity (i.e. cell) index, processor index and transform index (0 or positive integer) to a labelPair.
Definition at line 62 of file globalIndexAndTransform.H.
globalIndexAndTransform | ( | const polyMesh & | mesh | ) |
Construct from components.
Definition at line 342 of file globalIndexAndTransform.C.
References polyMesh::boundaryMesh(), distributionMapBase::constructSize(), globalMeshData::coupledPatch(), distributionMap::distribute(), Foam::endl(), Foam::first(), Pair< Type >::first(), forAll, globalMeshData::globalCoPointSlaves(), globalMeshData::globalCoPointSlavesMap(), polyMesh::globalData(), Foam::Info, PrimitivePatch< FaceList, PointField >::meshPoints(), Foam::constant::atomic::mp, IOobject::name(), primitiveMesh::nPoints(), globalIndexAndTransform::nullTransformIndex(), patchi, polyMesh::points(), transformer::t(), and transformer::T().
Referenced by globalIndexAndTransform::less::less().
|
delete |
Disallow default bitwise copy construction.
ClassName | ( | "globalIndexAndTransform" | ) |
|
inline |
Generate a transform index from the permutation indices of.
the independent transforms. Permutations indices must only be -1, 0 or +1.
Definition at line 74 of file globalIndexAndTransformI.H.
References Foam::abort(), Foam::constant::physicoChemical::b, globalIndexAndTransform::decodeTransformIndex(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), and List< T >::size().
Referenced by globalIndexAndTransform::less::less(), globalIndexAndTransform::less::operator()(), and globalIndexAndTransform::transformIndicesForPatches().
|
inline |
Decode transform index.
Definition at line 110 of file globalIndexAndTransformI.H.
References globalIndexAndTransform::addToTransformIndex(), and forAll.
Referenced by globalIndexAndTransform::encodeTransformIndex(), and globalIndexAndTransform::less::less().
|
inline |
Add patch transformation to transformIndex. Return new.
transformIndex. (by default the patch is the sending, not the receiving, patch)
Definition at line 128 of file globalIndexAndTransformI.H.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair< Type >::first(), Foam::labelMin, Foam::mag(), globalIndexAndTransform::minimumTransformIndex(), IOstream::name(), patchi, Pair< Type >::second(), Foam::sign(), T, transformer::T(), Foam::tr(), transformer::transforms(), Tensor< Cmpt >::xx(), Tensor< Cmpt >::yy(), and Tensor< Cmpt >::zz().
Referenced by globalIndexAndTransform::decodeTransformIndex(), and globalIndexAndTransform::less::less().
Combine two transformIndices.
Referenced by globalIndexAndTransform::less::less().
|
inline |
Combine two transformIndices.
Definition at line 239 of file globalIndexAndTransformI.H.
References forAll, and globalIndexAndTransform::subtractTransformIndex().
Referenced by globalIndexAndTransform::addToTransformIndex(), and globalIndexAndTransform::less::less().
|
inline |
Subtract two transformIndices.
Definition at line 283 of file globalIndexAndTransformI.H.
References globalIndexAndTransform::encode(), and forAll.
Referenced by globalIndexAndTransform::less::less(), and globalIndexAndTransform::minimumTransformIndex().
|
inline |
Encode index and bare index as components on own processor.
Definition at line 301 of file globalIndexAndTransformI.H.
Referenced by globalIndexAndTransform::less::less(), and globalIndexAndTransform::subtractTransformIndex().
|
inline |
Encode index and bare index as components on given processor.
Definition at line 311 of file globalIndexAndTransformI.H.
References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, globalIndexAndTransform::index(), and Foam::labelMax.
|
inline |
Index carried by the object.
Definition at line 345 of file globalIndexAndTransformI.H.
References Pair< Type >::first(), and globalIndexAndTransform::processor().
Referenced by distributionMap::distributionMap(), globalIndexAndTransform::encode(), and globalIndexAndTransform::less::less().
|
inline |
Which processor does this come from?
Definition at line 354 of file globalIndexAndTransformI.H.
References Pair< Type >::second(), and globalIndexAndTransform::transformIndex().
Referenced by distributionMap::distributionMap(), globalIndexAndTransform::index(), and globalIndexAndTransform::less::less().
|
inline |
Transform carried by the object.
Definition at line 363 of file globalIndexAndTransformI.H.
References Pair< Type >::second().
Referenced by distributionMap::distributionMap(), globalIndexAndTransform::less::less(), globalIndexAndTransform::processor(), and globalIndexAndTransform::transform().
|
inline |
Return the number of independent transforms.
Definition at line 371 of file globalIndexAndTransformI.H.
Referenced by globalIndexAndTransform::less::less().
|
inline |
Return access to the stored independent transforms.
Definition at line 378 of file globalIndexAndTransformI.H.
Referenced by globalIndexAndTransform::less::less().
|
inline |
Return access to the permuted transforms.
Definition at line 385 of file globalIndexAndTransformI.H.
Referenced by distributionMap::distributionMap(), and globalIndexAndTransform::less::less().
|
inline |
Return the transformIndex (index in transformPermutations)
of the identity transform
Definition at line 391 of file globalIndexAndTransformI.H.
Referenced by globalIndexAndTransform::globalIndexAndTransform(), and globalIndexAndTransform::less::less().
|
inline |
Return access to the per-patch transform-sign pairs.
Definition at line 398 of file globalIndexAndTransformI.H.
References globalIndexAndTransform::transform().
Referenced by globalIndexAndTransform::less::less().
|
inline |
Access the overall (permuted) transform corresponding.
to the transformIndex
Definition at line 405 of file globalIndexAndTransformI.H.
References globalIndexAndTransform::transformIndex(), and globalIndexAndTransform::transformIndicesForPatches().
Referenced by globalIndexAndTransform::less::less(), and globalIndexAndTransform::patchTransformSign().
|
inline |
Access the all of the indices of the transform.
permutations corresponding the transforms of the listed patch indices. This only allows a maximum of three transformations (since routine is used to transform points and any given point can only be on 3 or less transforms)
Definition at line 414 of file globalIndexAndTransformI.H.
References Foam::constant::physicoChemical::b, HashTable< T, Key, Hash >::empty(), globalIndexAndTransform::encodeTransformIndex(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair< Type >::first(), forAllConstIter, Foam::mag(), patchi, Foam::pow(), Pair< Type >::second(), Foam::sign(), Foam::sum(), and globalIndexAndTransform::transformPatches().
Referenced by globalIndexAndTransform::less::less(), globalIndexAndTransform::transform(), and globalIndexAndTransform::transformPatches().
|
inline |
Apply all of the transform permutations.
corresponding the transforms of the listed patch indices to the supplied point
Definition at line 589 of file globalIndexAndTransformI.H.
References forAll, List< T >::size(), and globalIndexAndTransform::transformIndicesForPatches().
Referenced by globalIndexAndTransform::less::less(), and globalIndexAndTransform::transformIndicesForPatches().
|
delete |
Disallow default bitwise assignment.
Referenced by globalIndexAndTransform::less::less().