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. 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 () | |
Destructor. More... | |
label | encodeTransformIndex (const List< label > &permutationIndices) const |
Generate a transform index from the permutation indices of. 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... | |
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< Pair< label > > & | 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... | |
Static Public Member Functions | |
static labelPair | encode (const label index, const label transformIndex) |
Encode index and bare index as components on own processor. More... | |
static labelPair | encode (const label proci, const label index, const label transformIndex) |
Encode index and bare index as components on given processor. More... | |
static label | index (const labelPair &globalIAndTransform) |
Index carried by the object. More... | |
static label | processor (const labelPair &globalIAndTransform) |
Which processor does this come from? More... | |
static label | transformIndex (const labelPair &globalIAndTransform) |
Transform carried by the object. More... | |
Friends | |
class | globalPoints |
Declare friendship with the entry class for IO. 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.
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 60 of file globalIndexAndTransform.H.
globalIndexAndTransform | ( | const polyMesh & | mesh | ) |
Construct from components.
Definition at line 478 of file globalIndexAndTransform.C.
References Foam::endl(), forAll, vectorTensorTransform::hasR(), Foam::Info, IOobject::name(), patchi, vectorTensorTransform::R(), and vectorTensorTransform::t().
Destructor.
Definition at line 554 of file globalIndexAndTransform.C.
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(), globalIndexAndTransform::addToTransformIndex(), Foam::constant::physicoChemical::b, Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), globalIndexAndTransform::nIndependentTransforms(), List< T >::size(), and globalIndexAndTransform::transformIndex().
|
inline |
Add patch transformation to transformIndex. Return new.
transformIndex. (by default the patch is the sending, not the receiving, patch)
Definition at line 176 of file globalIndexAndTransformI.H.
References polyMesh::boundaryMesh(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair< Type >::first(), vectorTensorTransform::hasR(), Foam::mag(), globalIndexAndTransform::minimumTransformIndex(), IOobject::name(), patchi, vectorTensorTransform::R(), R, Pair< Type >::second(), Foam::sign(), vectorTensorTransform::t(), Foam::tr(), globalIndexAndTransform::transformIndex(), Tensor< Cmpt >::xx(), Tensor< Cmpt >::yy(), and Tensor< Cmpt >::zz().
Referenced by globalIndexAndTransform::encodeTransformIndex().
Combine two transformIndices.
|
inline |
Combine two transformIndices.
Definition at line 278 of file globalIndexAndTransformI.H.
References forAll, and globalIndexAndTransform::subtractTransformIndex().
Referenced by globalIndexAndTransform::addToTransformIndex().
|
inline |
Subtract two transformIndices.
Definition at line 322 of file globalIndexAndTransformI.H.
References globalIndexAndTransform::encode(), and forAll.
Referenced by globalIndexAndTransform::minimumTransformIndex().
|
inlinestatic |
Encode index and bare index as components on own processor.
Definition at line 340 of file globalIndexAndTransformI.H.
References UPstream::myProcNo().
Referenced by minEqOp< labelPair >::operator()(), and globalIndexAndTransform::subtractTransformIndex().
|
inlinestatic |
Encode index and bare index as components on given processor.
Definition at line 350 of file globalIndexAndTransformI.H.
References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, globalIndexAndTransform::index(), and Foam::labelMax.
|
inlinestatic |
Index carried by the object.
Definition at line 383 of file globalIndexAndTransformI.H.
References Pair< Type >::first(), and globalIndexAndTransform::processor().
Referenced by globalIndexAndTransform::encode(), mapDistribute::mapDistribute(), and minEqOp< labelPair >::operator()().
|
inlinestatic |
Which processor does this come from?
Definition at line 392 of file globalIndexAndTransformI.H.
References Pair< Type >::second(), and globalIndexAndTransform::transformIndex().
Referenced by globalIndexAndTransform::index(), mapDistribute::mapDistribute(), and minEqOp< labelPair >::operator()().
|
inlinestatic |
Transform carried by the object.
Definition at line 401 of file globalIndexAndTransformI.H.
References Pair< Type >::second().
Referenced by globalIndexAndTransform::addToTransformIndex(), globalIndexAndTransform::encodeTransformIndex(), mapDistribute::mapDistribute(), minEqOp< labelPair >::operator()(), globalIndexAndTransform::processor(), and globalIndexAndTransform::transform().
|
inline |
Return the number of independent transforms.
Definition at line 409 of file globalIndexAndTransformI.H.
Referenced by globalIndexAndTransform::encodeTransformIndex().
|
inline |
Return access to the stored independent transforms.
Definition at line 416 of file globalIndexAndTransformI.H.
|
inline |
Return access to the permuted transforms.
Definition at line 423 of file globalIndexAndTransformI.H.
Referenced by mapDistribute::mapDistribute().
|
inline |
Return the transformIndex (index in transformPermutations)
of the identity transform
Definition at line 429 of file globalIndexAndTransformI.H.
Referenced by minEqOp< labelPair >::operator()().
|
inline |
Return access to the per-patch transform-sign pairs.
Definition at line 436 of file globalIndexAndTransformI.H.
References globalIndexAndTransform::transform().
|
inline |
Access the overall (permuted) transform corresponding.
to the transformIndex
Definition at line 443 of file globalIndexAndTransformI.H.
References globalIndexAndTransform::transformIndex(), and globalIndexAndTransform::transformIndicesForPatches().
Referenced by globalIndexAndTransform::patchTransformSign().
|
inline |
Access the all of the indices of the transform.
permutations corresponding the transforms of the listed patch indices
Definition at line 452 of file globalIndexAndTransformI.H.
References Foam::constant::physicoChemical::b, HashTable< T, Key, Hash >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair< Type >::first(), forAllConstIter(), Foam::mag(), patchi, Foam::pow(), Pair< Type >::second(), List< T >::setSize(), Foam::sign(), Foam::sum(), and globalIndexAndTransform::transformPatches().
Referenced by 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 627 of file globalIndexAndTransformI.H.
References forAll, List< T >::size(), and globalIndexAndTransform::transformIndicesForPatches().
Referenced by globalIndexAndTransform::transformIndicesForPatches().
|
friend |
Declare friendship with the entry class for IO.
Definition at line 163 of file globalIndexAndTransform.H.