globalIndexAndTransform Class Reference

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 transformertransform (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...
 

Detailed Description

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.

Source files

Definition at line 62 of file globalIndexAndTransform.H.

Constructor & Destructor Documentation

◆ globalIndexAndTransform() [1/2]

◆ globalIndexAndTransform() [2/2]

Disallow default bitwise copy construction.

Member Function Documentation

◆ ClassName()

ClassName ( "globalIndexAndTransform"  )

◆ encodeTransformIndex()

Foam::label encodeTransformIndex ( const labelList permutationIndices) const
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 73 of file globalIndexAndTransformI.H.

References Foam::abort(), b, Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), List< T >::size(), and globalIndexAndTransform::transformIndex().

Here is the call graph for this function:

◆ decodeTransformIndex()

Foam::labelList decodeTransformIndex ( const label  transformIndex) const
inline

Decode transform index.

Definition at line 109 of file globalIndexAndTransformI.H.

References forAll.

◆ addToTransformIndex()

Foam::label addToTransformIndex ( const label  transformIndex,
const label  patchi,
const bool  isSendingSide = true,
const scalar  tol = small 
) const
inline

Add patch transformation to transformIndex. Return new.

transformIndex. (by default the patch is the sending, not the receiving, patch)

Definition at line 127 of file globalIndexAndTransformI.H.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair< Type >::first(), Foam::labelMin, Foam::mag(), IOstream::name(), patchi, Pair< Type >::second(), Foam::sign(), transformer::T(), Foam::T(), Foam::tr(), and transformer::transforms().

Here is the call graph for this function:

◆ mergeTransformIndex()

label mergeTransformIndex ( const label  transformIndex0,
const label  transformIndex1 
) const
inline

Combine two transformIndices.

◆ minimumTransformIndex()

Foam::label minimumTransformIndex ( const label  transformIndex0,
const label  transformIndex1 
) const
inline

Combine two transformIndices.

Definition at line 238 of file globalIndexAndTransformI.H.

References forAll.

◆ subtractTransformIndex()

Foam::label subtractTransformIndex ( const label  transformIndex0,
const label  transformIndex1 
) const
inline

Subtract two transformIndices.

Definition at line 282 of file globalIndexAndTransformI.H.

References forAll.

◆ encode() [1/2]

Foam::labelPair encode ( const label  index,
const label  transformIndex 
) const
inline

Encode index and bare index as components on own processor.

Definition at line 300 of file globalIndexAndTransformI.H.

References UPstream::myProcNo().

Here is the call graph for this function:

◆ encode() [2/2]

Foam::labelPair encode ( const label  proci,
const label  index,
const label  transformIndex 
) const
inline

Encode index and bare index as components on given processor.

Definition at line 310 of file globalIndexAndTransformI.H.

References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::labelMax.

Here is the call graph for this function:

◆ index()

Foam::label index ( const labelPair globalIAndTransform) const
inline

Index carried by the object.

Definition at line 344 of file globalIndexAndTransformI.H.

References Pair< Type >::first().

Referenced by distributionMap::distributionMap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processor()

Foam::label processor ( const labelPair globalIAndTransform) const
inline

Which processor does this come from?

Definition at line 353 of file globalIndexAndTransformI.H.

References Pair< Type >::second().

Referenced by distributionMap::distributionMap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transformIndex()

Foam::label transformIndex ( const labelPair globalIAndTransform) const
inline

Transform carried by the object.

Definition at line 362 of file globalIndexAndTransformI.H.

References Pair< Type >::second().

Referenced by distributionMap::distributionMap(), and globalIndexAndTransform::encodeTransformIndex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nIndependentTransforms()

Foam::label nIndependentTransforms ( ) const
inline

Return the number of independent transforms.

Definition at line 371 of file globalIndexAndTransformI.H.

◆ transforms()

const Foam::List< Foam::transformer > & transforms ( ) const
inline

Return access to the stored independent transforms.

Definition at line 378 of file globalIndexAndTransformI.H.

◆ transformPermutations()

const Foam::List< Foam::transformer > & transformPermutations ( ) const
inline

Return access to the permuted transforms.

Definition at line 385 of file globalIndexAndTransformI.H.

Referenced by distributionMap::distributionMap().

Here is the caller graph for this function:

◆ nullTransformIndex()

Foam::label nullTransformIndex ( ) const
inline

Return the transformIndex (index in transformPermutations)

of the identity transform

Definition at line 391 of file globalIndexAndTransformI.H.

Referenced by globalIndexAndTransform::globalIndexAndTransform().

Here is the caller graph for this function:

◆ patchTransformSign()

const Foam::labelPairList & patchTransformSign ( ) const
inline

Return access to the per-patch transform-sign pairs.

Definition at line 398 of file globalIndexAndTransformI.H.

◆ transform()

const Foam::transformer & transform ( label  transformIndex) const
inline

Access the overall (permuted) transform corresponding.

to the transformIndex

Definition at line 404 of file globalIndexAndTransformI.H.

◆ transformIndicesForPatches()

Foam::labelList transformIndicesForPatches ( const labelHashSet patchIs) const
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 413 of file globalIndexAndTransformI.H.

References 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(), and Foam::sum().

Here is the call graph for this function:

◆ transformPatches()

Foam::pointField transformPatches ( const labelHashSet patchIs,
const point pt 
) const
inline

Apply all of the transform permutations.

corresponding the transforms of the listed patch indices to the supplied point

Definition at line 588 of file globalIndexAndTransformI.H.

References forAll, and List< T >::size().

Here is the call graph for this function:

◆ operator=()

void operator= ( const globalIndexAndTransform )
delete

Disallow default bitwise assignment.


The documentation for this class was generated from the following files: