Foam::patchToPatchTools Namespace Reference

Functions

label singleProcess (const label srcSize, const label tgtSize)
 Determine whether this intersection is confined to a single processor or. More...
 
autoPtr< distributionMapconstructDistributionMap (const labelListList &procSendIndices)
 Turn a list of send-to-processor indices into a distribution map. More...
 
List< remotedistributeAddressing (const distributionMap &map)
 Construct local addressing from the given distribution map. The result is a. More...
 
labelListList procSendIndices (const labelListList &tgtLocalSrcFaces, const List< remote > &localTgtProcFaces)
 Given a local intersection addressing, determine what elements need sending. More...
 
labelListList procSendIndices (const List< DynamicList< label >> &tgtLocalSrcFaces, const List< remote > &localTgtProcFaces)
 Dynamic list overload of the above. More...
 
void trimDistributionMap (const boolList &oldIsUsed, distributionMap &map, labelList &oldToNew, labelList &newToOld)
 Trim unused elements from a distribution map. Return the map and maps. More...
 
template<class SubListA , class SubListB >
static void transferListList (List< SubListA > &a, List< SubListB > &b)
 Transfer list-list b into list-list a. More...
 
template<class Type >
static void rDistributeListList (const label size, const distributionMap &map, List< List< Type >> &data)
 Reverse distribute a list-list given the map. More...
 
template<class Type >
static void rDistributeListList (const label size, const distributionMap &map, List< DynamicList< Type >> &data)
 Dynamic list overload of the above. More...
 
List< List< remote > > localToRemote (const labelListList &indices, const List< remote > &indexToProcIndex=NullObjectRef< List< remote >>())
 Map local to remote indices. More...
 
List< List< remote > > localToRemote (const List< DynamicList< label >> &indices, const List< remote > &indexToProcIndex=NullObjectRef< List< remote >>())
 Dynamic list overload of the above. More...
 
void rDistributeTgtAddressing (const label tgtSize, const distributionMap &tgtMap, const List< remote > &localSrcProcFaces, labelListList &tgtLocalSrcFaces)
 Reverse distribute a set of target addressing. More...
 
void rDistributeTgtAddressing (const label tgtSize, const distributionMap &tgtMap, const List< remote > &localSrcProcFaces, List< DynamicList< label >> &tgtLocalSrcFaces)
 Dynamic list overload of the above. More...
 
template<class Type >
static Type NaN ()
 Return a primitive with all components set to NaN. More...
 
template<class Type , class LabelList , class ScalarList >
static tmp< Field< Type > > interpolate (const List< LabelList > &localOtherFaces, const List< ScalarList > &weights, const autoPtr< distributionMap > &otherMapPtr, const Field< Type > &otherFld)
 Interpolate with normalisation. More...
 
template<class Type , class LabelList , class ScalarList >
static tmp< Field< Type > > interpolate (const List< LabelList > &localOtherFaces, const List< ScalarList > &weights, const autoPtr< distributionMap > &otherMapPtr, const Field< Type > &otherFld, const Field< Type > &leftOverFld)
 Interpolate without normalisation. More...
 

Function Documentation

◆ singleProcess()

Foam::label singleProcess ( const label  srcSize,
const label  tgtSize 
)

Determine whether this intersection is confined to a single processor or.

not, purely from the numbers of elements in the geometry

Definition at line 30 of file patchToPatchTools.C.

References Foam::count(), and Foam::findIndex().

Referenced by cellsToCells::update(), and patchToPatch::update().

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

◆ constructDistributionMap()

Foam::autoPtr< Foam::distributionMap > constructDistributionMap ( const labelListList procSendIndices)

Turn a list of send-to-processor indices into a distribution map.

Definition at line 73 of file patchToPatchTools.C.

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

Referenced by cellsToCells::update(), and patchToPatch::update().

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

◆ distributeAddressing()

Foam::List< Foam::remote > distributeAddressing ( const distributionMap map)

Construct local addressing from the given distribution map. The result is a.

list of remote element indices that correspond to the elements that were sent by the distribution map.

Definition at line 117 of file patchToPatchTools.C.

References distributionMapBase::constructMap(), PstreamBuffers::finishedSends(), forAll, List< T >::setSize(), List< T >::size(), and distributionMapBase::subMap().

Referenced by patchToPatch::distributeSrc(), and cellsToCells::update().

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

◆ procSendIndices() [1/2]

Foam::labelListList procSendIndices ( const labelListList tgtLocalSrcFaces,
const List< remote > &  localTgtProcFaces 
)

Given a local intersection addressing, determine what elements need sending.

to each processor

Definition at line 186 of file patchToPatchTools.C.

References forAll.

Referenced by constructDistributionMap(), procSendIndices(), cellsToCells::update(), and patchToPatch::update().

Here is the caller graph for this function:

◆ procSendIndices() [2/2]

Foam::labelListList procSendIndices ( const List< DynamicList< label >> &  tgtLocalSrcFaces,
const List< remote > &  localTgtProcFaces 
)

Dynamic list overload of the above.

Definition at line 217 of file patchToPatchTools.C.

References procSendIndices().

Here is the call graph for this function:

◆ trimDistributionMap()

void trimDistributionMap ( const boolList oldIsUsed,
distributionMap map,
labelList oldToNew,
labelList newToOld 
)

Trim unused elements from a distribution map. Return the map and maps.

between the old and new construct list.

Definition at line 232 of file patchToPatchTools.C.

References distributionMapBase::constructMap(), Foam::count(), forAll, List< T >::resize(), List< T >::size(), and distributionMapBase::subMap().

Referenced by patchToPatch::finaliseLocal(), and cellsToCells::trimLocalTgt().

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

◆ transferListList()

static void Foam::patchToPatchTools::transferListList ( List< SubListA > &  a,
List< SubListB > &  b 
)
inlinestatic

Transfer list-list b into list-list a.

Referenced by rDistributeTgtAddressing().

Here is the caller graph for this function:

◆ rDistributeListList() [1/2]

static void Foam::patchToPatchTools::rDistributeListList ( const label  size,
const distributionMap map,
List< List< Type >> &  data 
)
inlinestatic

Reverse distribute a list-list given the map.

Referenced by nearest::rDistributeTgt(), rDistributeTgtAddressing(), and cellsToCells::update().

Here is the caller graph for this function:

◆ rDistributeListList() [2/2]

static void Foam::patchToPatchTools::rDistributeListList ( const label  size,
const distributionMap map,
List< DynamicList< Type >> &  data 
)
inlinestatic

Dynamic list overload of the above.

◆ localToRemote() [1/2]

Foam::List< Foam::List< Foam::remote > > localToRemote ( const labelListList indices,
const List< remote > &  indexToProcIndex = NullObjectRef<List<remote>>() 
)

Map local to remote indices.

Definition at line 302 of file patchToPatchTools.C.

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

Referenced by localToRemote(), rDistributeTgtAddressing(), patchToPatch::srcTgtProcFaces(), and patchToPatch::tgtSrcProcFaces().

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

◆ localToRemote() [2/2]

Foam::List< Foam::List< Foam::remote > > localToRemote ( const List< DynamicList< label >> &  indices,
const List< remote > &  indexToProcIndex = NullObjectRef<List<remote>>() 
)

Dynamic list overload of the above.

Definition at line 327 of file patchToPatchTools.C.

References localToRemote().

Here is the call graph for this function:

◆ rDistributeTgtAddressing() [1/2]

void rDistributeTgtAddressing ( const label  tgtSize,
const distributionMap tgtMap,
const List< remote > &  localSrcProcFaces,
labelListList tgtLocalSrcFaces 
)

Reverse distribute a set of target addressing.

Definition at line 342 of file patchToPatchTools.C.

References forAll, HashTable< T, Key, Hash >::insert(), localToRemote(), rDistributeListList(), and List< T >::resize().

Referenced by patchToPatch::rDistributeTgt(), rDistributeTgtAddressing(), and cellsToCells::update().

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

◆ rDistributeTgtAddressing() [2/2]

void rDistributeTgtAddressing ( const label  tgtSize,
const distributionMap tgtMap,
const List< remote > &  localSrcProcFaces,
List< DynamicList< label >> &  tgtLocalSrcFaces 
)

Dynamic list overload of the above.

Definition at line 381 of file patchToPatchTools.C.

References rDistributeTgtAddressing(), and transferListList().

Here is the call graph for this function:

◆ NaN()

◆ interpolate() [1/2]

static tmp<Field<Type> > Foam::patchToPatchTools::interpolate ( const List< LabelList > &  localOtherFaces,
const List< ScalarList > &  weights,
const autoPtr< distributionMap > &  otherMapPtr,
const Field< Type > &  otherFld 
)
static

Interpolate with normalisation.

Referenced by cellsToCells::srcToTgt(), patchToPatch::srcToTgt(), cellsToCells::tgtToSrc(), and patchToPatch::tgtToSrc().

Here is the caller graph for this function:

◆ interpolate() [2/2]

static tmp<Field<Type> > Foam::patchToPatchTools::interpolate ( const List< LabelList > &  localOtherFaces,
const List< ScalarList > &  weights,
const autoPtr< distributionMap > &  otherMapPtr,
const Field< Type > &  otherFld,
const Field< Type > &  leftOverFld 
)
static

Interpolate without normalisation.