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"  )

Referenced by globalIndexAndTransform::less::less().

Here is the caller graph for this function:

◆ 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 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().

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

◆ decodeTransformIndex()

Foam::labelList decodeTransformIndex ( const label  transformIndex) const
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().

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

◆ 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 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().

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

◆ mergeTransformIndex()

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

Combine two transformIndices.

Referenced by globalIndexAndTransform::less::less().

Here is the caller graph for this function:

◆ minimumTransformIndex()

Foam::label minimumTransformIndex ( const label  transformIndex0,
const label  transformIndex1 
) const
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().

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

◆ subtractTransformIndex()

Foam::label subtractTransformIndex ( const label  transformIndex0,
const label  transformIndex1 
) const
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().

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

◆ 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 301 of file globalIndexAndTransformI.H.

Referenced by globalIndexAndTransform::less::less(), and globalIndexAndTransform::subtractTransformIndex().

Here is the caller 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 311 of file globalIndexAndTransformI.H.

References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, globalIndexAndTransform::index(), 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 345 of file globalIndexAndTransformI.H.

References Pair< Type >::first(), and globalIndexAndTransform::processor().

Referenced by distributionMap::distributionMap(), globalIndexAndTransform::encode(), and globalIndexAndTransform::less::less().

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 354 of file globalIndexAndTransformI.H.

References Pair< Type >::second(), and globalIndexAndTransform::transformIndex().

Referenced by distributionMap::distributionMap(), globalIndexAndTransform::index(), and globalIndexAndTransform::less::less().

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 363 of file globalIndexAndTransformI.H.

References Pair< Type >::second().

Referenced by distributionMap::distributionMap(), globalIndexAndTransform::less::less(), globalIndexAndTransform::processor(), and globalIndexAndTransform::transform().

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.

Referenced by globalIndexAndTransform::less::less().

Here is the caller graph for this function:

◆ transforms()

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

Return access to the stored independent transforms.

Definition at line 378 of file globalIndexAndTransformI.H.

Referenced by globalIndexAndTransform::less::less().

Here is the caller graph for this function:

◆ 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(), and globalIndexAndTransform::less::less().

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(), and globalIndexAndTransform::less::less().

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.

References globalIndexAndTransform::transform().

Referenced by globalIndexAndTransform::less::less().

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

◆ transform()

const Foam::transformer & transform ( label  transformIndex) const
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().

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

◆ 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 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().

Here is the call graph for this function:
Here is the caller 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 589 of file globalIndexAndTransformI.H.

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

Referenced by globalIndexAndTransform::less::less(), and globalIndexAndTransform::transformIndicesForPatches().

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

◆ operator=()

void operator= ( const globalIndexAndTransform )
delete

Disallow default bitwise assignment.

Referenced by globalIndexAndTransform::less::less().

Here is the caller graph for this function:

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