Loading...
Searching...
No Matches
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...

#include <globalIndexAndTransform.H>

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.
label encodeTransformIndex (const labelList &permutationIndices) const
 Generate a transform index from the permutation indices of.
labelList decodeTransformIndex (const label transformIndex) const
 Decode transform index.
label addToTransformIndex (const label transformIndex, const label patchi, const bool isSendingSide=true, const scalar tol=SMALL) const
 Add patch transformation to transformIndex. Return new.
label mergeTransformIndex (const label transformIndex0, const label transformIndex1) const
 Combine two transformIndices.
label minimumTransformIndex (const label transformIndex0, const label transformIndex1) const
 Combine two transformIndices.
label subtractTransformIndex (const label transformIndex0, const label transformIndex1) const
 Subtract two transformIndices.
labelPair encode (const label index, const label transformIndex) const
 Encode index and bare index as components on own processor.
labelPair encode (const label proci, const label index, const label transformIndex) const
 Encode index and bare index as components on given processor.
label index (const labelPair &globalIAndTransform) const
 Index carried by the object.
label processor (const labelPair &globalIAndTransform) const
 Which processor does this come from?
label transformIndex (const labelPair &globalIAndTransform) const
 Transform carried by the object.
label nIndependentTransforms () const
 Return the number of independent transforms.
const List< vectorTensorTransform > & transforms () const
 Return access to the stored independent transforms.
const List< vectorTensorTransform > & transformPermutations () const
 Return access to the permuted transforms.
label nullTransformIndex () const
 Return the transformIndex (index in transformPermutations).
const List< labelPair > & patchTransformSign () const
 Return access to the per-patch transform-sign pairs.
const vectorTensorTransformtransform (label transformIndex) const
 Access the overall (permuted) transform corresponding.
labelList transformIndicesForPatches (const labelHashSet &patchIs) const
 Access the all of the indices of the transform.
pointField transformPatches (const labelHashSet &patchIs, const point &pt) const
 Apply all of the transform permutations.

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 60 of file globalIndexAndTransform.H.

Constructor & Destructor Documentation

◆ globalIndexAndTransform()

Member Function Documentation

◆ ClassName()

ClassName ( "globalIndexAndTransform" )

References mesh, and transformIndex().

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

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

Referenced by addToTransformIndex(), subtractTransformIndex(), and 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 105 of file globalIndexAndTransformI.H.

References forAll, transformIndex(), and Foam::Zero.

Referenced by addToTransformIndex(), minimumTransformIndex(), and subtractTransformIndex().

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

References decodeTransformIndex(), encodeTransformIndex(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair< T >::first(), vectorTensorTransform::hasR(), Foam::labelMin, Foam::mag(), vectorTensorTransform::R(), R, Pair< T >::second(), Foam::sign(), vectorTensorTransform::t(), Foam::tr(), and transformIndex().

Here is the call graph for this function:

◆ mergeTransformIndex()

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

Combine two transformIndices.

References index(), and transformIndex().

Here is the call graph for this function:

◆ minimumTransformIndex()

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

Combine two transformIndices.

Definition at line 234 of file globalIndexAndTransformI.H.

References decodeTransformIndex(), and forAll.

Here is the call graph for this function:

◆ subtractTransformIndex()

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

Subtract two transformIndices.

Definition at line 278 of file globalIndexAndTransformI.H.

References decodeTransformIndex(), encodeTransformIndex(), and forAll.

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

References encode(), index(), UPstream::myProcNo(), and transformIndex().

Referenced by encode().

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

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

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

References Pair< T >::first().

Referenced by encode(), encode(), mapDistribute::mapDistribute(), mapDistribute::mapDistribute(), and mergeTransformIndex().

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

References Pair< T >::second().

Referenced by mapDistribute::mapDistribute(), and mapDistribute::mapDistribute().

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

References Pair< T >::second().

Referenced by addToTransformIndex(), ClassName(), decodeTransformIndex(), encode(), encode(), encodeTransformIndex(), mapDistribute::mapDistribute(), mapDistribute::mapDistribute(), mergeTransformIndex(), and 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 367 of file globalIndexAndTransformI.H.

◆ transforms()

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

Return access to the stored independent transforms.

Definition at line 374 of file globalIndexAndTransformI.H.

◆ transformPermutations()

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

Return access to the permuted transforms.

Definition at line 381 of file globalIndexAndTransformI.H.

Referenced by mapDistribute::mapDistribute(), and mapDistribute::mapDistribute().

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

Referenced by 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 394 of file globalIndexAndTransformI.H.

◆ transform()

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

Access the overall (permuted) transform corresponding.

to the transformIndex

Definition at line 400 of file globalIndexAndTransformI.H.

References transformIndex().

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

References b, HashTable< T, Key, Hash >::empty(), encodeTransformIndex(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair< T >::first(), Foam::mag(), Foam::pow(), Pair< T >::second(), List< T >::setSize(), Foam::sign(), Foam::sum(), and Foam::Zero.

Referenced by 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 582 of file globalIndexAndTransformI.H.

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

Here is the call graph for this function:

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