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... | |
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< vectorTensorTransform > & | transforms () const |
Return access to the stored independent transforms. More... | |
const List< vectorTensorTransform > & | 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 vectorTensorTransform & | 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... | |
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 64 of file globalIndexAndTransform.H.
globalIndexAndTransform | ( | const polyMesh & | mesh | ) |
Construct from components.
Definition at line 456 of file globalIndexAndTransform.C.
References List< T >::append(), polyMesh::boundaryMesh(), mapDistributeBase::constructSize(), globalMeshData::coupledPatch(), mapDistribute::distribute(), Foam::endl(), FixedList< T, N >::first(), forAll, globalMeshData::globalCoPointSlaves(), globalMeshData::globalCoPointSlavesMap(), polyMesh::globalData(), vectorTensorTransform::hasR(), Foam::Info, PrimitivePatch< FaceList, PointField >::meshPoints(), IOobject::name(), primitiveMesh::nPoints(), globalIndexAndTransform::nullTransformIndex(), patches, polyMesh::points(), vectorTensorTransform::R(), and vectorTensorTransform::t().
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 76 of file globalIndexAndTransformI.H.
References Foam::abort(), b, Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), UList< T >::size(), and globalIndexAndTransform::transformIndex().
|
inline |
Decode transform index.
Definition at line 112 of file globalIndexAndTransformI.H.
References forAll, and Foam::Zero.
|
inline |
Add patch transformation to transformIndex. Return new.
transformIndex. (by default the patch is the sending, not the receiving, patch)
Definition at line 130 of file globalIndexAndTransformI.H.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, FixedList< T, N >::first(), vectorTensorTransform::hasR(), Foam::labelMin, Foam::mag(), IOstream::name(), vectorTensorTransform::R(), R, Pair< T >::second(), Foam::sign(), vectorTensorTransform::t(), and Foam::tr().
|
inline |
Combine two transformIndices.
|
inline |
Combine two transformIndices.
Definition at line 241 of file globalIndexAndTransformI.H.
References forAll.
|
inline |
Subtract two transformIndices.
Definition at line 285 of file globalIndexAndTransformI.H.
References forAll.
|
inline |
Encode index and bare index as components on own processor.
Definition at line 303 of file globalIndexAndTransformI.H.
References processorFaPatch::myProcNo().
|
inline |
Encode index and bare index as components on given processor.
Definition at line 313 of file globalIndexAndTransformI.H.
References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::labelMax.
|
inline |
Index carried by the object.
Definition at line 347 of file globalIndexAndTransformI.H.
References FixedList< T, N >::first().
Referenced by mapDistribute::mapDistribute().
|
inline |
Which processor does this come from?
Definition at line 356 of file globalIndexAndTransformI.H.
References Pair< T >::second().
Referenced by mapDistribute::mapDistribute().
|
inline |
Transform carried by the object.
Definition at line 365 of file globalIndexAndTransformI.H.
References Pair< T >::second().
Referenced by globalIndexAndTransform::encodeTransformIndex(), and mapDistribute::mapDistribute().
|
inline |
Return the number of independent transforms.
Definition at line 374 of file globalIndexAndTransformI.H.
|
inline |
Return access to the stored independent transforms.
Definition at line 381 of file globalIndexAndTransformI.H.
|
inline |
Return access to the permuted transforms.
Definition at line 388 of file globalIndexAndTransformI.H.
Referenced by mapDistribute::mapDistribute().
|
inline |
Return the transformIndex (index in transformPermutations)
of the identity transform
Definition at line 394 of file globalIndexAndTransformI.H.
Referenced by globalIndexAndTransform::globalIndexAndTransform().
|
inline |
Return access to the per-patch transform-sign pairs.
Definition at line 401 of file globalIndexAndTransformI.H.
|
inline |
Access the overall (permuted) transform corresponding.
to the transformIndex
Definition at line 407 of file globalIndexAndTransformI.H.
|
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 416 of file globalIndexAndTransformI.H.
References b, HashTable< T, Key, Hash >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, FixedList< T, N >::first(), Foam::mag(), Foam::pow(), Pair< T >::second(), List< T >::setSize(), Foam::sign(), Foam::sum(), and Foam::Zero.
|
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, and UList< T >::size().