Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
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. 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 vectorTensorTransformtransform (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...
 

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.

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 ( const polyMesh mesh)

Construct from components.

Definition at line 490 of file globalIndexAndTransform.C.

References Foam::endl(), forAll, vectorTensorTransform::hasR(), Foam::Info, IOobject::name(), vectorTensorTransform::R(), and vectorTensorTransform::t().

Here is the call graph for this function:

Destructor.

Definition at line 566 of file globalIndexAndTransform.C.

Member Function Documentation

ClassName ( "globalIndexAndTransform"  )
Foam::label encodeTransformIndex ( const List< label > &  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(), globalIndexAndTransform::addToTransformIndex(), Foam::constant::physicoChemical::b, Foam::FatalError, FatalErrorIn, forAll, Foam::mag(), globalIndexAndTransform::nIndependentTransforms(), List< T >::size(), and globalIndexAndTransform::transformIndex().

Here is the call graph for this function:

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

References polyMesh::boundaryMesh(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Pair< Type >::first(), vectorTensorTransform::hasR(), Foam::mag(), globalIndexAndTransform::minimumTransformIndex(), IOobject::name(), 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().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Combine two transformIndices.

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

Combine two transformIndices.

Definition at line 300 of file globalIndexAndTransformI.H.

References forAll, and globalIndexAndTransform::subtractTransformIndex().

Referenced by globalIndexAndTransform::addToTransformIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Subtract two transformIndices.

Definition at line 344 of file globalIndexAndTransformI.H.

References globalIndexAndTransform::encode(), and forAll.

Referenced by globalIndexAndTransform::minimumTransformIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Encode index and bare index as components on own processor.

Definition at line 362 of file globalIndexAndTransformI.H.

References UPstream::myProcNo().

Referenced by minEqOp< labelPair >::operator()(), and globalIndexAndTransform::subtractTransformIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::labelPair encode ( const label  procI,
const label  index,
const label  transformIndex 
)
inlinestatic

Encode index and bare index as components on given processor.

Definition at line 372 of file globalIndexAndTransformI.H.

References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorIn, globalIndexAndTransform::index(), and Foam::labelMax.

Here is the call graph for this function:

Foam::label index ( const labelPair globalIAndTransform)
inlinestatic

Index carried by the object.

Definition at line 421 of file globalIndexAndTransformI.H.

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

Referenced by globalIndexAndTransform::encode(), mapDistribute::mapDistribute(), and minEqOp< labelPair >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::label processor ( const labelPair globalIAndTransform)
inlinestatic

Which processor does this come from?

Definition at line 430 of file globalIndexAndTransformI.H.

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

Referenced by globalIndexAndTransform::index(), mapDistribute::mapDistribute(), and minEqOp< labelPair >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::label transformIndex ( const labelPair globalIAndTransform)
inlinestatic

Transform carried by the object.

Definition at line 439 of file globalIndexAndTransformI.H.

References Pair< Type >::second().

Referenced by globalIndexAndTransform::addToTransformIndex(), globalIndexAndTransform::encodeTransformIndex(), mapDistribute::mapDistribute(), minEqOp< labelPair >::operator()(), globalIndexAndTransform::processor(), and globalIndexAndTransform::transform().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::label nIndependentTransforms ( ) const
inline

Return the number of independent transforms.

Definition at line 447 of file globalIndexAndTransformI.H.

Referenced by globalIndexAndTransform::encodeTransformIndex().

Here is the caller graph for this function:

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

Return access to the stored independent transforms.

Definition at line 454 of file globalIndexAndTransformI.H.

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

Return access to the permuted transforms.

Definition at line 461 of file globalIndexAndTransformI.H.

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

Here is the caller graph for this function:

Foam::label nullTransformIndex ( ) const
inline

Return the transformIndex (index in transformPermutations)

of the identity transform

Definition at line 467 of file globalIndexAndTransformI.H.

Referenced by minEqOp< labelPair >::operator()().

Here is the caller graph for this function:

const Foam::List< Foam::Pair< Foam::label > > & patchTransformSign ( ) const
inline

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

Definition at line 474 of file globalIndexAndTransformI.H.

References globalIndexAndTransform::transform().

Here is the call graph for this function:

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

Access the overall (permuted) transform corresponding.

to the transformIndex

Definition at line 481 of file globalIndexAndTransformI.H.

References globalIndexAndTransform::transformIndex(), and globalIndexAndTransform::transformIndicesForPatches().

Referenced by globalIndexAndTransform::patchTransformSign().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 490 of file globalIndexAndTransformI.H.

References Foam::constant::physicoChemical::b, HashTable< T, Key, Hash >::empty(), Foam::exit(), Foam::FatalError, FatalErrorIn, Pair< Type >::first(), forAllConstIter(), Foam::mag(), Foam::pow(), Pair< Type >::second(), List< T >::setSize(), Foam::sign(), Foam::sum(), and globalIndexAndTransform::transformPatches().

Referenced by globalIndexAndTransform::transform(), and globalIndexAndTransform::transformPatches().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Referenced by globalIndexAndTransform::transformIndicesForPatches().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class globalPoints
friend

Declare friendship with the entry class for IO.

Definition at line 163 of file globalIndexAndTransform.H.


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