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...
Data Structures | |
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... | |
Private Member Functions | |
void | determineTransforms () |
Determine all of the independent basic transforms of the. More... | |
void | determineTransformPermutations () |
Generate all of the transformation permutations. More... | |
void | determinePatchTransformSign () |
label | matchTransform (const List< vectorTensorTransform > &refTransforms, label &matchedRefTransformI, const vectorTensorTransform &testTransform, scalar tolerance, bool checkBothSigns) const |
Test a list of reference transforms to see if the test. More... | |
label | encodeTransformIndex (const FixedList< Foam::label, 3 > &permutationIndices) const |
Encode transform index. Hardcoded to 3 independent transforms max. More... | |
FixedList< label, 3 > | decodeTransformIndex (const label transformIndex) const |
Decode transform index. Hardcoded to 3 independent transforms max. More... | |
globalIndexAndTransform (const globalIndexAndTransform &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const globalIndexAndTransform &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const polyMesh & | mesh_ |
Reference to mesh. More... | |
List< vectorTensorTransform > | transforms_ |
The possible independent (non-permuted) transforms of the. More... | |
List< vectorTensorTransform > | transformPermutations_ |
The permutations of the transforms, stored for lookup. More... | |
label | nullTransformIndex_ |
Index of identity transform. More... | |
List< Pair< label > > | patchTransformSign_ |
Mapping from patch index to which transform it matches (or. More... | |
Static Private Attributes | |
static const label | base_ = 32 |
Number of spaces to reserve for transform encoding. 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.
|
private |
Disallow default bitwise copy construct.
globalIndexAndTransform | ( | const polyMesh & | mesh | ) |
Construct from components.
Definition at line 478 of file globalIndexAndTransform.C.
References Foam::endl(), forAll, vectorTensorTransform::hasR(), Foam::Info, patches, vectorTensorTransform::R(), and vectorTensorTransform::t().
Destructor.
Definition at line 554 of file globalIndexAndTransform.C.
|
private |
Determine all of the independent basic transforms of the.
geometry by analysing the coupledPolyPatches
Definition at line 126 of file globalIndexAndTransform.C.
References polyMesh::boundaryMesh(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Pstream::gatherList(), vectorTensorTransform::hasR(), Foam::I, Foam::mag(), UPstream::master(), coupledPolyPatch::matchTolerance(), globalIndexAndTransform::matchTransform(), globalIndexAndTransform::mesh_, UPstream::myProcNo(), Foam::nl, coupledPolyPatch::NOORDERING, UPstream::nProcs(), coupledPolyPatch::parallel(), patches, coupledPolyPatch::reverseT(), Pstream::scatter(), coupledPolyPatch::separated(), coupledPolyPatch::separation(), vectorTensorTransform::t(), globalIndexAndTransform::transform(), globalIndexAndTransform::transforms_, and WarningInFunction.
|
private |
Generate all of the transformation permutations.
Definition at line 309 of file globalIndexAndTransform.C.
References Foam::constant::physicoChemical::b, forAll, Foam::inv(), Foam::pow(), Foam::transform(), and w().
|
private |
Determine which patch uses which transform (if any) and which Sign to use
Definition at line 350 of file globalIndexAndTransform.C.
References forAll, Foam::I, Foam::mag(), coupledPolyPatch::matchTolerance(), coupledPolyPatch::NOORDERING, coupledPolyPatch::parallel(), patches, coupledPolyPatch::reverseT(), coupledPolyPatch::separated(), coupledPolyPatch::separation(), Foam::sign(), and Foam::transform().
|
private |
Test a list of reference transforms to see if the test.
transform matches one. Return +1 or -1 depending on the sign of the match, or 0 if none matches.
Definition at line 41 of file globalIndexAndTransform.C.
References forAll, vectorTensorTransform::hasR(), Foam::mag(), Foam::magSqr(), Foam::max(), vectorTensorTransform::R(), Foam::sqrt(), vectorTensorTransform::t(), and Tensor::T().
Referenced by globalIndexAndTransform::determineTransforms().
|
inlineprivate |
Encode transform index. Hardcoded to 3 independent transforms max.
Definition at line 110 of file globalIndexAndTransformI.H.
Referenced by InteractionLists< typename CloudType::parcelType >::findExtendedProcBbsInRange().
|
inlineprivate |
Decode transform index. Hardcoded to 3 independent transforms max.
Definition at line 138 of file globalIndexAndTransformI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
private |
Disallow default bitwise assignment.
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, Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), List::size(), and w().
|
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 Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair::first(), vectorTensorTransform::hasR(), Foam::mag(), IOstream::name(), vectorTensorTransform::R(), R, Pair::second(), Foam::sign(), vectorTensorTransform::t(), and Foam::tr().
Combine two transformIndices.
|
inline |
Combine two transformIndices.
Definition at line 278 of file globalIndexAndTransformI.H.
References forAll.
|
inline |
Subtract two transformIndices.
Definition at line 322 of file globalIndexAndTransformI.H.
References forAll.
|
inlinestatic |
Encode index and bare index as components on own processor.
Definition at line 340 of file globalIndexAndTransformI.H.
Referenced by InteractionLists< typename CloudType::parcelType >::buildInteractionLists(), globalMeshData::calcGlobalEdgeSlaves(), globalMeshData::calcGlobalPointBoundaryCells(), globalMeshData::calcGlobalPointBoundaryFaces(), globalMeshData::calcGlobalPointEdges(), and globalMeshData::calcPointConnectivity().
|
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, and Foam::labelMax.
|
inlinestatic |
Index carried by the object.
Definition at line 383 of file globalIndexAndTransformI.H.
References Pair::first().
Referenced by InteractionLists< typename CloudType::parcelType >::buildInteractionLists(), globalMeshData::calcGlobalEdgeSlaves(), globalMeshData::calcGlobalPointEdges(), globalMeshData::calcPointConnectivity(), globalMeshData::findTransform(), mapDistribute::mapDistribute(), InteractionLists< typename CloudType::parcelType >::prepareParticlesToRefer(), and InteractionLists< typename CloudType::parcelType >::prepareWallDataToRefer().
|
inlinestatic |
Which processor does this come from?
Definition at line 392 of file globalIndexAndTransformI.H.
References Pair::second().
Referenced by globalMeshData::calcGlobalEdgeSlaves(), globalMeshData::calcGlobalPointEdges(), globalMeshData::calcPointConnectivity(), globalMeshData::findTransform(), and mapDistribute::mapDistribute().
|
inlinestatic |
Transform carried by the object.
Definition at line 401 of file globalIndexAndTransformI.H.
References Pair::second().
Referenced by InteractionLists< typename CloudType::parcelType >::buildInteractionLists(), globalMeshData::calcGlobalEdgeSlaves(), globalMeshData::findTransform(), mapDistribute::mapDistribute(), InteractionLists< typename CloudType::parcelType >::prepareParticleToBeReferred(), and InteractionLists< typename CloudType::parcelType >::prepareWallDataToRefer().
|
inline |
Return the number of independent transforms.
Definition at line 409 of file globalIndexAndTransformI.H.
References globalIndexAndTransform::transforms_.
Referenced by InteractionLists< typename CloudType::parcelType >::findExtendedProcBbsInRange().
|
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::applyInverseTransforms(), mapDistribute::applyTransforms(), and mapDistribute::mapDistribute().
|
inline |
Return the transformIndex (index in transformPermutations)
of the identity transform
Definition at line 429 of file globalIndexAndTransformI.H.
Referenced by globalMeshData::calcPointConnectivity().
|
inline |
Return access to the per-patch transform-sign pairs.
Definition at line 436 of file globalIndexAndTransformI.H.
|
inline |
Access the overall (permuted) transform corresponding.
to the transformIndex
Definition at line 443 of file globalIndexAndTransformI.H.
Referenced by InteractionLists< typename CloudType::parcelType >::buildInteractionLists(), globalIndexAndTransform::determineTransforms(), InteractionLists< typename CloudType::parcelType >::findExtendedProcBbsInRange(), InteractionLists< typename CloudType::parcelType >::prepareParticleToBeReferred(), and InteractionLists< typename CloudType::parcelType >::prepareWallDataToRefer().
|
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::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair::first(), forAllConstIter(), Foam::mag(), Foam::pow(), Pair::second(), List::setSize(), Foam::sign(), and Foam::sum().
|
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, and List::size().
|
friend |
Declare friendship with the entry class for IO.
Definition at line 163 of file globalIndexAndTransform.H.
|
private |
Reference to mesh.
Definition at line 84 of file globalIndexAndTransform.H.
Referenced by globalIndexAndTransform::determineTransforms().
|
private |
The possible independent (non-permuted) transforms of the.
geometry, i.e. for a geometry with two cyclics, this stores the two transforms, not the eight permutations. There may not be more than three transforms in the range of coupledPolyPatch geometries (separated XOR non-parallel) and symmetries (cuboid periodicity only) supported.
Definition at line 93 of file globalIndexAndTransform.H.
Referenced by globalIndexAndTransform::determineTransforms(), and globalIndexAndTransform::nIndependentTransforms().
|
private |
The permutations of the transforms, stored for lookup.
efficiency. If there are n transforms, then there are (3^n) permutations, including the no-transformation transform.
Definition at line 99 of file globalIndexAndTransform.H.
|
private |
Index of identity transform.
Definition at line 102 of file globalIndexAndTransform.H.
Mapping from patch index to which transform it matches (or.
-1 for none) (.first()) and what sign to use for it, i.e. +/- 1 (.second()).
Definition at line 107 of file globalIndexAndTransform.H.
|
staticprivate |
Number of spaces to reserve for transform encoding.
Definition at line 113 of file globalIndexAndTransform.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.