mapDistributeBase Class Reference

Class containing processor-to-processor mapping information. More...

Inheritance diagram for mapDistributeBase:

Public Types

enum  layoutTypes : char { linear, localFirst }
 The map layout (eg, of the constructMap) More...
 

Public Member Functions

 ClassName ("mapDistributeBase")
 
 mapDistributeBase () noexcept
 Default construct (uses worldComm) More...
 
 mapDistributeBase (const label comm) noexcept
 Default construct with specified communicator. More...
 
 mapDistributeBase (const mapDistributeBase &map)
 Copy construct. More...
 
 mapDistributeBase (mapDistributeBase &&map)
 Move construct. More...
 
 mapDistributeBase (const dictionary &dict, const label comm=UPstream::worldComm)
 Read construct from dictionary. More...
 
 mapDistributeBase (const label constructSize, labelListList &&subMap, labelListList &&constructMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm)
 Move construct from components. More...
 
 mapDistributeBase (const labelUList &sendProcs, const labelUList &recvProcs, const label comm=UPstream::worldComm)
 Construct from reverse addressing: per data item the send processor and the receive processor. More...
 
 mapDistributeBase (const globalIndex &, labelList &elements, List< Map< label >> &compactMap, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
 Construct from list of (possibly) remote elements in globalIndex numbering (or -1). More...
 
 mapDistributeBase (const globalIndex &, labelListList &cellCells, List< Map< label >> &compactMap, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
 Special variant that works with the info sorted into bins according to local indices. More...
 
 mapDistributeBase (const layoutTypes constructLayout, labelListList &&subMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm)
 Construct from my elements to send, targetting the specified constructMap layout. More...
 
 mapDistributeBase (labelListList &&subMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm)
 Construct from my elements to send. More...
 
 mapDistributeBase (const UPtrList< const mapDistributeBase > &maps, const labelList &localRanks, const label newComm, const labelListList &newToOldRanks, labelList &startOfLocal, List< Map< label >> &compactMaps)
 Construct from multiple maps and processor collation. More...
 
 mapDistributeBase (Istream &is)
 Construct from Istream. More...
 
label constructSize () const noexcept
 Constructed data size. More...
 
label & constructSize () noexcept
 Constructed data size. More...
 
const labelListListsubMap () const noexcept
 From subsetted data back to original data. More...
 
labelListListsubMap () noexcept
 From subsetted data back to original data. More...
 
const labelListListconstructMap () const noexcept
 From subsetted data to new reconstructed data. More...
 
labelListListconstructMap () noexcept
 From subsetted data to new reconstructed data. More...
 
bool subHasFlip () const noexcept
 Does subMap include a sign. More...
 
bool & subHasFlip () noexcept
 Does subMap include a sign. More...
 
bool constructHasFlip () const noexcept
 Does constructMap include a sign. More...
 
bool & constructHasFlip () noexcept
 Does constructMap include a sign. More...
 
label comm () const noexcept
 The communicator used. More...
 
label nMaps () const noexcept
 The number of sub-lists within the maps. More...
 
labelList subMapSizes () const
 The sizes of the subMap lists. More...
 
labelList constructMapSizes () const
 The sizes of the constructMap lists. More...
 
label subMapTotalSize () const noexcept
 The sum of the subMap list sizes. More...
 
label constructMapTotalSize () const noexcept
 The sum of the constructMap list sizes. More...
 
const List< labelPair > & schedule () const
 Return a schedule. Demand driven. See above. More...
 
const List< labelPair > & whichSchedule (const UPstream::commsTypes commsType) const
 Return real or dummy schedule depending on the communication type. More...
 
void clear ()
 Reset to zero size, only retaining communicator. More...
 
void transfer (mapDistributeBase &rhs)
 Transfer the contents of the argument and annul the argument. More...
 
void compactLocalData (const bitSet &allowedLocalElems, const int tag=UPstream::msgType(), const bool doRenumber=false)
 Compact send/receive maps based on selection of originating local (send) elements. More...
 
void compactRemoteData (const bitSet &allowedRemoteElems, const int tag=UPstream::msgType(), const bool doRenumber=false)
 Compact send/receive maps based on selection of remote (receive) elements. More...
 
void compactLocalData (const bitSet &allowedLocalElems, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType())
 Compact send/receive maps based on selection of originating local (send) elements. Returns compaction mappings for subMap and constructMap. More...
 
void compactRemoteData (const bitSet &allowedRemoteElems, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType())
 Compact send/receive maps based on selection of remote (receive) elements. Returns compaction mappings for subMap and constructMap. More...
 
void compactData (const labelUList &localElements, const labelUList &remoteElements, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType())
 Compact send/receive maps based on selection of originating local (send) and remote (receive) elements. More...
 
void compactLocalData (const labelUList &localElements, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType())
 Compact send/receive maps based on selection of originating local (send) elements. More...
 
void compactRemoteData (const labelUList &remoteElements, labelList &oldToNewSub, labelList &oldToNewConstruct, const label localSize=-1, const int tag=UPstream::msgType())
 Compact send/receive maps based on selection of remote (receive) elements. More...
 
template<class T >
void distribute (List< T > &values, const int tag=UPstream::msgType()) const
 Distribute List data using default commsType and the default flip/negate operator. More...
 
template<class T >
void distribute (DynamicList< T > &values, const int tag=UPstream::msgType()) const
 Distribute DynamicList data using default commsType and the default flip/negate operator. More...
 
template<class T >
void distribute (const UPstream::commsTypes commsType, List< T > &values, const int tag=UPstream::msgType()) const
 Distribute List data using specified commsType and the default flip/negate operator. More...
 
template<class T >
void distribute (const UPstream::commsTypes commsType, DynamicList< T > &values, const int tag=UPstream::msgType()) const
 Distribute DynamicList data using specified commsType and the default flip/negate operator. More...
 
template<class T , class NegateOp >
void distribute (List< T > &values, const NegateOp &negOp, const int tag=UPstream::msgType()) const
 Distribute data using default commsType and the specified negate operator (for flips). More...
 
template<class T , class NegateOp >
void distribute (const UPstream::commsTypes commsType, List< T > &values, const NegateOp &negOp, const int tag=UPstream::msgType()) const
 Distribute data using specified commsType and the specified negate operator (for flips). More...
 
template<class T , class NegateOp >
void distribute (const UPstream::commsTypes commsType, const T &nullValue, List< T > &values, const NegateOp &negOp, const int tag=UPstream::msgType()) const
 Distribute data using specified commsType and the specified negate operator (for flips). More...
 
template<class T >
void reverseDistribute (const label constructSize, List< T > &values, const int tag=UPstream::msgType()) const
 Reverse distribute data using default commsType and the default flip/negate operator. More...
 
template<class T >
void reverseDistribute (const label constructSize, const T &nullValue, List< T > &values, const int tag=UPstream::msgType()) const
 Reverse distribute data using default commsType and the default flip/negate operator. More...
 
template<class T >
void reverseDistribute (const UPstream::commsTypes commsType, const label constructSize, List< T > &values, const int tag=UPstream::msgType()) const
 Reverse distribute data using specified commsType and the default flip/negate operator. More...
 
template<class T , class NegateOp >
void reverseDistribute (const UPstream::commsTypes commsType, const label constructSize, List< T > &values, const NegateOp &negOp, const int tag=UPstream::msgType()) const
 Reverse distribute data using specified commsType and the specified flip/negate operator. More...
 
template<class T >
void reverseDistribute (const UPstream::commsTypes commsType, const label constructSize, const T &nullValue, List< T > &values, const int tag=UPstream::msgType()) const
 Reverse distribute data using specified commsType and the default flip/negate operator. More...
 
template<class T >
void send (PstreamBuffers &pBufs, const List< T > &field) const
 Do all sends using PstreamBuffers. More...
 
template<class T >
void receive (PstreamBuffers &pBufs, List< T > &field) const
 Do all receives using PstreamBuffers. More...
 
template<class T >
void send (const UList< T > &field, labelRange &sendRequests, PtrList< List< T >> &sendFields, labelRange &recvRequests, PtrList< List< T >> &recvFields, const int tag=UPstream::msgType()) const
 Start all sends and receives (always non-blocking) More...
 
template<class T >
void receive (const labelRange &requests, const UPtrList< List< T >> &recvFields, List< T > &field, const int tag=UPstream::msgType()) const
 Wait for (receive) requests to finish and consume. More...
 
void printLayout (Ostream &os) const
 Debug: print layout. Can only be used on maps with sorted. More...
 
void operator= (const mapDistributeBase &rhs)
 Copy assignment. More...
 
void operator= (mapDistributeBase &&rhs)
 Move assignment. More...
 
InfoProxy< mapDistributeBaseinfo () const noexcept
 Return info proxy, used to print summary information to a stream. More...
 
void readDict (const dictionary &dict)
 Read entries from dictionary format. More...
 
void writeEntries (Ostream &os) const
 Write entries in dictionary format. More...
 
void updateMesh (const mapPolyMesh &)
 No correction for topo change. More...
 
void compact (const boolList &remoteElemUsed, const int tag=UPstream::msgType())
 OpenFOAM-v2112 and earlier naming for compactRemoteData() using boolList. More...
 
void compact (const boolList &remoteElemUsed, const label localSize, labelList &oldToNewSub, labelList &oldToNewConstruct, const int tag=UPstream::msgType())
 OpenFOAM-v2112 and earlier naming for compactRemoteData(). using boolList. More...
 
template<class T , class NegateOp >
Foam::List< TaccessAndFlip (const UList< T > &values, const labelUList &map, const bool hasFlip, const NegateOp &negOp)
 

Static Public Member Functions

static bool hasFlipAddressing (const labelUList &map)
 Test for flip addressing, where flips are encoded as negative indices and non-flips are encoded as positive non-zero indices. More...
 
static bool hasFlipAddressing (const labelListList &maps)
 Test for flip addressing, where flips are encoded as negative indices and non-flips are encoded as positive non-zero indices. More...
 
static label countUnmapped (const labelUList &elements, const labelListList &maps, const bool hasFlip)
 Count the number of unmapped elements. More...
 
static List< labelPairschedule (const labelListList &subMap, const labelListList &constructMap, const int tag, const label comm=UPstream::worldComm)
 Calculate a communication schedule. See above. More...
 
static label renumber (const globalIndex &, const label comm, const List< Map< label >> &compactMap, const label globalElement)
 Helper for construct from globalIndex. Renumbers element. More...
 
static label renumberMap (labelListList &mapElements, const labelUList &oldToNew, const bool hasFlip)
 Helper for renumbering the (compacted) map elements using the supplied old-to-new mapping. More...
 
static label renumberMap (labelList &map, const label localSize, const label offset, const Map< label > &cMap, const bool hasFlip)
 Helper for renumbering the map elements. Assumes local elements are first, followed by any remote. Local elements get offset, remote elements are mapped. More...
 
static label renumberMap (labelListList &mapElements, const label localSize, const label offset, const Map< label > &cMap, const bool hasFlip)
 Helper for a list of maps. Calls above renumberMap for all elements. More...
 
template<class T , class CombineOp , class NegateOp >
static void distribute (const UPstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &field, const T &nullValue, const CombineOp &cop, const NegateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
 Distribute combine data with specified combine operation and negate operator (for flips). More...
 
template<class T , class NegateOp >
static void distribute (const UPstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &field, const NegateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
 Distribute assign data with specified negate operator (for flips). Uses assignment for combine operation. More...
 
template<class T , class negateOp >
static void send (const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, const UList< T > &field, labelRange &sendRequests, PtrList< List< T >> &sendFields, labelRange &recvRequests, PtrList< List< T >> &recvFields, const negateOp &negOp, const int tag, const label comm)
 Start all sends and receives (always non-blocking) More...
 
template<class T , class CombineOp , class negateOp >
static void receive (const label constructSize, const labelListList &constructMap, const bool constructHasFlip, const labelRange &requests, const UPtrList< List< T >> &recvFields, List< T > &field, const CombineOp &cop, const negateOp &negOp, const int tag, const label comm)
 Wait for (receive) requests to finish and consume. More...
 

Protected Member Functions

void calcCompactAddressing (const globalIndex &globalNumbering, const labelUList &elements, List< Map< label >> &compactMap) const
 Construct per processor compact addressing of the global elements. More...
 
void calcCompactAddressing (const globalIndex &globalNumbering, const labelListList &elements, List< Map< label >> &compactMap) const
 
void exchangeAddressing (const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label >> &compactMap, labelList &compactStart)
 
void exchangeAddressing (const int tag, const globalIndex &globalNumbering, labelListList &elements, List< Map< label >> &compactMap, labelList &compactStart)
 

Static Protected Member Functions

static void checkReceivedSize (const label proci, const label expectedSize, const label receivedSize)
 Fatal if expected != received size. More...
 
static label getMappedSize (const labelListList &maps, const bool hasFlip)
 Scan the maps for the max addressed index. More...
 
static void exchangeMasks (const UList< bitSet > &sendMasks, UList< bitSet > &recvMasks, const int tag, const label comm)
 Synchronize send/recv mask buffers as a 'copy' operation. More...
 
static void unionCombineMasks (UList< bitSet > &sendMasks, UList< bitSet > &recvMasks, const int tag, const label comm)
 Bi-direction sync of send/recv buffers using bitwise '&=' combine operation. More...
 
template<class T , class CombineOp , class NegateOp >
static void flipAndCombine (List< T > &lhs, const UList< T > &rhs, const labelUList &map, const bool hasFlip, const CombineOp &cop, const NegateOp &negOp)
 Combine field values (after any flip negation operation) into the specified mapped target locations. More...
 
template<class T , class NegateOp >
static void accessAndFlip (List< T > &output, const UList< T > &values, const labelUList &map, const bool hasFlip, const NegateOp &negOp)
 Lookup field values at specified map indices and save after any flip negation operations. More...
 
template<class T , class NegateOp >
static List< TaccessAndFlip (const UList< T > &values, const labelUList &map, const bool hasFlip, const NegateOp &negOp)
 Lookup field values at specified indices and return after any flip negation operations. More...
 

Friends

Istreamoperator>> (Istream &, mapDistributeBase &)
 Read plain content (not dictionary) from Istream. More...
 
Ostreamoperator<< (Ostream &, const mapDistributeBase &)
 Write plain content (not dictionary) to Ostream. More...
 

Detailed Description

Class containing processor-to-processor mapping information.

We store mapping from the bits-to-send to the complete starting list (subXXXMap) and from the received bits to their location in the new list (constructXXXMap).

Note: Schedule is a list of processor pairs (one send, one receive. One of them will be myself) which forms a scheduled (i.e. non-buffered) exchange. See distribute on how to use it. Note2: number of items sent on one processor have to equal the number of items received on the other processor.

To aid constructing these maps there are the constructors from global numbering, either with or without transforms.

Constructors using compact numbering: layout is

  • all my own elements first (whether used or not)
  • followed by used-only remote elements sorted by remote processor. So e.g 4 procs and on proc 1 the compact table will first have all globalIndex.localSize() elements from proc1 followed by used-only elements of proc0, proc2, proc3. The constructed mapDistributeBase sends the local elements from and receives the remote elements into their compact position. compactMap[proci] is the position of elements from proci in the compact map. compactMap[myProcNo()] is empty since trivial addressing.

It rewrites the input global indices into indices into the constructed data.

When constructing from components optionally a 'flip' on the maps can be specified. This will interpret the map values as index+flip, similar to e.g. faceProcAddressing. The flip will only be applied to fieldTypes (scalar, vector, .. triad)

Source files

Definition at line 103 of file mapDistributeBase.H.

Member Enumeration Documentation

◆ layoutTypes

enum layoutTypes : char
strong

The map layout (eg, of the constructMap)

Enumerator
linear 

In processor-order.

localFirst 

Local processor first, others in linear order.

Definition at line 110 of file mapDistributeBase.H.

Constructor & Destructor Documentation

◆ mapDistributeBase() [1/13]

mapDistributeBase ( )
noexcept

Default construct (uses worldComm)

Definition at line 645 of file mapDistributeBase.C.

◆ mapDistributeBase() [2/13]

mapDistributeBase ( const label  comm)
explicitnoexcept

Default construct with specified communicator.

Definition at line 651 of file mapDistributeBase.C.

◆ mapDistributeBase() [3/13]

Copy construct.

Definition at line 663 of file mapDistributeBase.C.

◆ mapDistributeBase() [4/13]

Move construct.

Definition at line 675 of file mapDistributeBase.C.

References mapDistributeBase::transfer().

Here is the call graph for this function:

◆ mapDistributeBase() [5/13]

mapDistributeBase ( const dictionary dict,
const label  comm = UPstream::worldComm 
)
explicit

Read construct from dictionary.

Definition at line 75 of file mapDistributeBaseIO.C.

References dict.

◆ mapDistributeBase() [6/13]

mapDistributeBase ( const label  constructSize,
labelListList &&  subMap,
labelListList &&  constructMap,
const bool  subHasFlip = false,
const bool  constructHasFlip = false,
const label  comm = UPstream::worldComm 
)

Move construct from components.

Definition at line 684 of file mapDistributeBase.C.

◆ mapDistributeBase() [7/13]

mapDistributeBase ( const labelUList sendProcs,
const labelUList recvProcs,
const label  comm = UPstream::worldComm 
)

Construct from reverse addressing: per data item the send processor and the receive processor.

Note
data is not sorted per processor - cannot use printLayout!

Definition at line 704 of file mapDistributeBase.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, UPstream::myProcNo(), UPstream::nProcs(), List< T >::setSize(), UList< T >::size(), and Foam::Zero.

Here is the call graph for this function:

◆ mapDistributeBase() [8/13]

mapDistributeBase ( const globalIndex globalNumbering,
labelList elements,
List< Map< label >> &  compactMap,
const int  tag = UPstream::msgType(),
const label  comm = UPstream::worldComm 
)

Construct from list of (possibly) remote elements in globalIndex numbering (or -1).

Determines compact numbering (see above) and distribute map to get data into this ordering and renumbers the elements to be in compact numbering.

Definition at line 789 of file mapDistributeBase.C.

References Foam::ensightOutput::debug, and Foam::Pout.

◆ mapDistributeBase() [9/13]

mapDistributeBase ( const globalIndex globalNumbering,
labelListList cellCells,
List< Map< label >> &  compactMap,
const int  tag = UPstream::msgType(),
const label  comm = UPstream::worldComm 
)

Special variant that works with the info sorted into bins according to local indices.

E.g. think cellCells where cellCells[localCellI] is a list of global cells

Definition at line 852 of file mapDistributeBase.C.

References Foam::ensightOutput::debug, and Foam::Pout.

◆ mapDistributeBase() [10/13]

mapDistributeBase ( const layoutTypes  constructLayout,
labelListList &&  subMap,
const bool  subHasFlip = false,
const bool  constructHasFlip = false,
const label  comm = UPstream::worldComm 
)
explicit

Construct from my elements to send, targetting the specified constructMap layout.

Definition at line 915 of file mapDistributeBase.C.

References Pstream::exchangeSizes(), forAll, Foam::identity(), UPstream::myProcNo(), and UPstream::nProcs().

Here is the call graph for this function:

◆ mapDistributeBase() [11/13]

mapDistributeBase ( labelListList &&  subMap,
const bool  subHasFlip = false,
const bool  constructHasFlip = false,
const label  comm = UPstream::worldComm 
)
explicit

Construct from my elements to send.

Assumes layout is my elements first followed by elements from all other processors in consecutive order.

Definition at line 981 of file mapDistributeBase.C.

◆ mapDistributeBase() [12/13]

mapDistributeBase ( const UPtrList< const mapDistributeBase > &  maps,
const labelList localRanks,
const label  newComm,
const labelListList newToOldRanks,
labelList startOfLocal,
List< Map< label >> &  compactMaps 
)

Construct from multiple maps and processor collation.

Assumes all local data first. Sorts contributions of maps in processor order i.e. constructed map has all local data first. Returns

  • startOfLocal : per input map the start of the local data. Extends one beyond number of maps so overall local size is startOfLocal.last()
  • compactMaps : per input map from slot position in the input map to new slot position. (note there is no information returned about which processor it is from)

Definition at line 1000 of file mapDistributeBase.C.

References UPtrList< T >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, UList< T >::find(), Foam::flatOutput(), forAll, Foam::labelMax, UList< T >::last(), Foam::mag(), Foam::min(), UPstream::myProcNo(), UPstream::nProcs(), List< T >::resize_nocopy(), List< T >::setSize(), UList< T >::size(), and UPtrList< T >::size().

Here is the call graph for this function:

◆ mapDistributeBase() [13/13]

mapDistributeBase ( Istream is)
explicit

Construct from Istream.

Definition at line 86 of file mapDistributeBaseIO.C.

Member Function Documentation

◆ checkReceivedSize()

void checkReceivedSize ( const label  proci,
const label  expectedSize,
const label  receivedSize 
)
staticprotected

Fatal if expected != received size.

Definition at line 160 of file mapDistributeBase.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

◆ getMappedSize()

Foam::label getMappedSize ( const labelListList maps,
const bool  hasFlip 
)
staticprotected

Scan the maps for the max addressed index.

Parameters
mapsThe maps to scan
hasFlipTrue if maps has flip addressing
Returns
max-size needed for addressing (eg, constructSize)

Definition at line 83 of file mapDistributeBase.C.

References Foam::mag(), and Foam::max().

Here is the call graph for this function:

◆ calcCompactAddressing() [1/2]

void calcCompactAddressing ( const globalIndex globalNumbering,
const labelUList elements,
List< Map< label >> &  compactMap 
) const
protected

Construct per processor compact addressing of the global elements.

needed. The ones from the local processor are not included since these are always all needed.

Definition at line 381 of file mapDistributeBase.C.

References forAll, globalIndex::isLocal(), UPstream::myProcNo(), UPstream::nProcs(), List< T >::resize_nocopy(), globalIndex::toLocal(), globalIndex::whichProcID(), and Foam::Zero.

Here is the call graph for this function:

◆ calcCompactAddressing() [2/2]

void calcCompactAddressing ( const globalIndex globalNumbering,
const labelListList elements,
List< Map< label >> &  compactMap 
) const
protected

◆ exchangeAddressing() [1/2]

void exchangeAddressing ( const int  tag,
const globalIndex globalNumbering,
labelList elements,
List< Map< label >> &  compactMap,
labelList compactStart 
)
protected

◆ exchangeAddressing() [2/2]

void exchangeAddressing ( const int  tag,
const globalIndex globalNumbering,
labelListList elements,
List< Map< label >> &  compactMap,
labelList compactStart 
)
protected

◆ exchangeMasks()

void exchangeMasks ( const UList< bitSet > &  sendMasks,
UList< bitSet > &  recvMasks,
const int  tag,
const label  comm 
)
staticprotected

Synchronize send/recv mask buffers as a 'copy' operation.

Somewhat similar to Pstream::exchangeContainer

The masks must be properly sized by the caller, which avoids a needless all-to-all for the sizes and the sizing is already given by the maps.

Definition at line 113 of file mapDistributeBaseSubset.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, Foam::blockMeshTools::read(), UList< T >::size(), and Foam::vtk::write().

Here is the call graph for this function:

◆ unionCombineMasks()

void unionCombineMasks ( UList< bitSet > &  sendMasks,
UList< bitSet > &  recvMasks,
const int  tag,
const label  comm 
)
staticprotected

Bi-direction sync of send/recv buffers using bitwise '&=' combine operation.

The masks must be properly sized by the caller, which avoids a needless all-to-all for the sizes and the sizing is already given by the maps.

Definition at line 192 of file mapDistributeBaseSubset.C.

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

Here is the call graph for this function:

◆ flipAndCombine()

void flipAndCombine ( List< T > &  lhs,
const UList< T > &  rhs,
const labelUList map,
const bool  hasFlip,
const CombineOp &  cop,
const NegateOp &  negOp 
)
staticprotected

Combine field values (after any flip negation operation) into the specified mapped target locations.

Parameters
[in,out]lhsThe left of binary combine operation
rhsThe right of binary combine operation
mapThe mapping indices
hasFlipMapping indices include flip encoding
copBinary combine operation
negOpUnary negation operation (for flipped indices)

Definition at line 30 of file mapDistributeBaseTemplates.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and UList< T >::size().

Here is the call graph for this function:

◆ accessAndFlip() [1/3]

void accessAndFlip ( List< T > &  output,
const UList< T > &  values,
const labelUList map,
const bool  hasFlip,
const NegateOp &  negOp 
)
staticprotected

Lookup field values at specified map indices and save after any flip negation operations.

Parameters
[out]outputThe result values
[out]valuesThe input values
mapThe mapping indices
hasFlipMapping indices include flip encoding
negOpUnary negation operation (for flipped indices)

Definition at line 77 of file mapDistributeBaseTemplates.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, Foam::output(), UList< T >::size(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ accessAndFlip() [2/3]

static List<T> accessAndFlip ( const UList< T > &  values,
const labelUList map,
const bool  hasFlip,
const NegateOp &  negOp 
)
staticprotected

Lookup field values at specified indices and return after any flip negation operations.

Parameters
[out]valuesThe input values
mapThe mapping indices
hasFlipMapping indices include flip encoding
negOpUnary negation operation (for flipped indices)

◆ ClassName()

ClassName ( "mapDistributeBase"  )

◆ hasFlipAddressing() [1/2]

bool hasFlipAddressing ( const labelUList map)
static

Test for flip addressing, where flips are encoded as negative indices and non-flips are encoded as positive non-zero indices.

Exits early on the first detected zero or negative, which makes this more efficient than testing min(map) < 0.

Note
may return a false negative (ie, no flips detected) even when flip addressing is used, but the local map does not contain any flipped elements

Definition at line 39 of file mapDistributeBase.C.

◆ hasFlipAddressing() [2/2]

bool hasFlipAddressing ( const labelListList maps)
static

Test for flip addressing, where flips are encoded as negative indices and non-flips are encoded as positive non-zero indices.

See notes above.

Definition at line 59 of file mapDistributeBase.C.

◆ countUnmapped()

Foam::label countUnmapped ( const labelUList elements,
const labelListList maps,
const bool  hasFlip 
)
static

Count the number of unmapped elements.

Parameters
elementsThe elements that are expected to be mapped
mapsThe maps to scan
hasFlipTrue if maps has flip addressing
Returns
number of unmapped elements

Definition at line 108 of file mapDistributeBase.C.

References bitSet::count(), UList< T >::empty(), Foam::mag(), and bitSet::unset().

Here is the call graph for this function:

◆ constructSize() [1/2]

◆ constructSize() [2/2]

label& constructSize ( )
inlinenoexcept

Constructed data size.

Definition at line 649 of file mapDistributeBase.H.

◆ subMap() [1/2]

◆ subMap() [2/2]

labelListList& subMap ( )
inlinenoexcept

From subsetted data back to original data.

Definition at line 665 of file mapDistributeBase.H.

◆ constructMap() [1/2]

const labelListList& constructMap ( ) const
inlinenoexcept

From subsetted data to new reconstructed data.

Definition at line 673 of file mapDistributeBase.H.

Referenced by AMIInterpolation::agglomerate(), mappedPatchFieldBase< scalar >::distribute(), refinementHistory::distribute(), distributedTriSurfaceMesh::findNearest(), and distributedTriSurfaceMesh::getVolumeType().

Here is the caller graph for this function:

◆ constructMap() [2/2]

labelListList& constructMap ( )
inlinenoexcept

From subsetted data to new reconstructed data.

Definition at line 681 of file mapDistributeBase.H.

◆ subHasFlip() [1/2]

bool subHasFlip ( ) const
inlinenoexcept

Does subMap include a sign.

Definition at line 689 of file mapDistributeBase.H.

Referenced by distributedTriSurfaceMesh::findNearest(), distributedTriSurfaceMesh::getVolumeType(), and fvMeshTools::writeProcAddressing().

Here is the caller graph for this function:

◆ subHasFlip() [2/2]

bool& subHasFlip ( )
inlinenoexcept

Does subMap include a sign.

Definition at line 697 of file mapDistributeBase.H.

◆ constructHasFlip() [1/2]

bool constructHasFlip ( ) const
inlinenoexcept

Does constructMap include a sign.

Definition at line 705 of file mapDistributeBase.H.

Referenced by distributedTriSurfaceMesh::findNearest(), distributedTriSurfaceMesh::getVolumeType(), and fvMeshTools::writeProcAddressing().

Here is the caller graph for this function:

◆ constructHasFlip() [2/2]

bool& constructHasFlip ( )
inlinenoexcept

Does constructMap include a sign.

Definition at line 713 of file mapDistributeBase.H.

◆ comm()

label comm ( ) const
inlinenoexcept

The communicator used.

Definition at line 721 of file mapDistributeBase.H.

Referenced by distributedTriSurfaceMesh::findNearest(), and distributedTriSurfaceMesh::getVolumeType().

Here is the caller graph for this function:

◆ nMaps()

label nMaps ( ) const
inlinenoexcept

The number of sub-lists within the maps.

Definition at line 729 of file mapDistributeBase.H.

References UList< T >::size().

Here is the call graph for this function:

◆ subMapSizes()

Foam::labelList subMapSizes ( ) const

The sizes of the subMap lists.

Definition at line 1447 of file mapDistributeBase.C.

References forAll.

◆ constructMapSizes()

Foam::labelList constructMapSizes ( ) const

The sizes of the constructMap lists.

Definition at line 1458 of file mapDistributeBase.C.

References forAll.

◆ subMapTotalSize()

Foam::label subMapTotalSize ( ) const
noexcept

The sum of the subMap list sizes.

Definition at line 1469 of file mapDistributeBase.C.

◆ constructMapTotalSize()

Foam::label constructMapTotalSize ( ) const
noexcept

The sum of the constructMap list sizes.

Definition at line 1480 of file mapDistributeBase.C.

◆ schedule() [1/2]

Foam::List< Foam::labelPair > schedule ( const labelListList subMap,
const labelListList constructMap,
const int  tag,
const label  comm = UPstream::worldComm 
)
static

◆ schedule() [2/2]

const Foam::List< Foam::labelPair > & schedule ( ) const

Return a schedule. Demand driven. See above.

Definition at line 273 of file mapDistributeBase.C.

References UPstream::msgType().

Here is the call graph for this function:

◆ whichSchedule()

const Foam::List< Foam::labelPair > & whichSchedule ( const UPstream::commsTypes  commsType) const

Return real or dummy schedule depending on the communication type.

Definition at line 291 of file mapDistributeBase.C.

References List< T >::null(), and UPstream::scheduled.

Here is the call graph for this function:

◆ clear()

void clear ( )

Reset to zero size, only retaining communicator.

Definition at line 1491 of file mapDistributeBase.C.

Referenced by mapDistribute::clear().

Here is the caller graph for this function:

◆ transfer()

void transfer ( mapDistributeBase rhs)

Transfer the contents of the argument and annul the argument.

Definition at line 1503 of file mapDistributeBase.C.

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

Here is the caller graph for this function:

◆ renumber()

Foam::label renumber ( const globalIndex globalNumbering,
const label  comm,
const List< Map< label >> &  compactMap,
const label  globalElement 
)
static

Helper for construct from globalIndex. Renumbers element.

(in globalIndex numbering) into compact indices.

Definition at line 1526 of file mapDistributeBase.C.

References globalIndex::isLocal(), UPstream::myProcNo(), globalIndex::toLocal(), and globalIndex::whichProcID().

Here is the call graph for this function:

◆ renumberMap() [1/3]

Foam::label renumberMap ( labelListList mapElements,
const labelUList oldToNew,
const bool  hasFlip 
)
static

Helper for renumbering the (compacted) map elements using the supplied old-to-new mapping.

Only compacts the maps, does not change the local layout.

Parameters
[in,out]mapElementsThe map to be renumbered
oldToNewThe old-to-new mapping
hasFlipTrue if map has flip addressing
Returns
max-size needed for new addressing (eg, constructSize)

Definition at line 274 of file mapDistributeBaseSubset.C.

References Foam::mag(), and Foam::max().

Here is the call graph for this function:

◆ renumberMap() [2/3]

Foam::label renumberMap ( labelList map,
const label  localSize,
const label  offset,
const Map< label > &  cMap,
const bool  hasFlip 
)
static

Helper for renumbering the map elements. Assumes local elements are first, followed by any remote. Local elements get offset, remote elements are mapped.

Parameters
[in,out]mapThe map to be renumbered
localSizeelements < localSize are offset
offsetoffset
cMapmap for non-local elements
hasFlipTrue if map has flip addressing
Returns
max-size needed for new addressing (eg, constructSize)

Definition at line 326 of file mapDistributeBaseSubset.C.

References Foam::mag(), and Foam::max().

Here is the call graph for this function:

◆ renumberMap() [3/3]

Foam::label renumberMap ( labelListList mapElements,
const label  localSize,
const label  offset,
const Map< label > &  cMap,
const bool  hasFlip 
)
static

Helper for a list of maps. Calls above renumberMap for all elements.

Definition at line 392 of file mapDistributeBaseSubset.C.

References Foam::max().

Here is the call graph for this function:

◆ compactLocalData() [1/3]

void compactLocalData ( const bitSet allowedLocalElems,
const int  tag = UPstream::msgType(),
const bool  doRenumber = false 
)

Compact send/receive maps based on selection of originating local (send) elements.

Determines and removes the correspondingly unneeded elements in the send/receive maps. Only compacts the maps, does not change the local layout.

Parameters
allowedLocalElemsPermissible local mapped elements (true/false). Can be longer/shorter than actual number of mapped elements.
tagThe message tag
doRenumberApply oldToNew internally to renumber entries (uses renumberMap) and adjust the constructSize
Note
generally preferable to compact based on remote data (ie, the actual receiver)

Definition at line 893 of file mapDistributeBaseSubset.C.

◆ compactRemoteData() [1/3]

void compactRemoteData ( const bitSet allowedRemoteElems,
const int  tag = UPstream::msgType(),
const bool  doRenumber = false 
)

Compact send/receive maps based on selection of remote (receive) elements.

Determines and removes the correspondingly unneeded elements in the send/receive maps. Only compacts the maps, does not change the local layout.

Parameters
allowedRemoteElemsPermissible remote mapped elements (true/false). Can be longer/shorter than actual number of mapped elements.
tagThe message tag
doRenumberApply oldToNew internally to renumber entries (uses renumberMap) and adjust the constructSize

Definition at line 915 of file mapDistributeBaseSubset.C.

◆ compactLocalData() [2/3]

void compactLocalData ( const bitSet allowedLocalElems,
labelList oldToNewSub,
labelList oldToNewConstruct,
const label  localSize = -1,
const int  tag = UPstream::msgType() 
)

Compact send/receive maps based on selection of originating local (send) elements. Returns compaction mappings for subMap and constructMap.

Parameters
allowedLocalElemsPermissible local mapped elements (true/false). Can be longer/shorter than actual number of mapped elements.
[out]oldToNewSubOld-to-new mapping: subMap Disabled if labelList::null(),
[out]oldToNewConstructOld-to-new mapping: constructMap Disabled if labelList::null(),
localSizeThe max index for subMap (-1: auto-detect)
tagThe message tag
Note
Applies oldToNew to renumber entries (uses renumberMap) and adjust constructSize
generally preferable to compact based on remote data (ie, the actual receiver)

Definition at line 937 of file mapDistributeBaseSubset.C.

◆ compactRemoteData() [2/3]

void compactRemoteData ( const bitSet allowedRemoteElems,
labelList oldToNewSub,
labelList oldToNewConstruct,
const label  localSize = -1,
const int  tag = UPstream::msgType() 
)

Compact send/receive maps based on selection of remote (receive) elements. Returns compaction mappings for subMap and constructMap.

Parameters
allowedRemoteElemsPermissible remote mapped elements (true/false). Can be longer/shorter than actual number of mapped elements.
[out]oldToNewSubOld-to-new mapping: subMap Disabled if labelList::null(),
[out]oldToNewConstructOld-to-new mapping: constructMap Disabled if labelList::null(),
localSizeThe max index for subMap (-1: auto-detect)
tagThe message tag
Note
Applies oldToNew to renumber entries (uses renumberMap) and adjust constructSize

Definition at line 968 of file mapDistributeBaseSubset.C.

◆ compactData()

void compactData ( const labelUList localElements,
const labelUList remoteElements,
labelList oldToNewSub,
labelList oldToNewConstruct,
const label  localSize = -1,
const int  tag = UPstream::msgType() 
)

Compact send/receive maps based on selection of originating local (send) and remote (receive) elements.

The resulting compact numbering:

  • subMap (and oldToNewSub) : will follow the original ordering of localElements.
  • constructMap (and oldToNewConstruct) : will follow the original ordering of remoteElements.
Warning
ill-defined behaviour if localElements or remoteElements contains duplicates.

Definition at line 721 of file mapDistributeBaseSubset.C.

◆ compactLocalData() [3/3]

void compactLocalData ( const labelUList localElements,
labelList oldToNewSub,
labelList oldToNewConstruct,
const label  localSize = -1,
const int  tag = UPstream::msgType() 
)

Compact send/receive maps based on selection of originating local (send) elements.

The resulting compact numbering:

  • subMap (and oldToNewSub) : will follow the original ordering of localElements.
  • constructMap (and oldToNewConstruct) : numbered in simple ascending order.
Warning
ill-defined behaviour if localElements contains duplicates.
Note
generally preferable to compact based on remote data (ie, the actual receiver)

Definition at line 773 of file mapDistributeBaseSubset.C.

◆ compactRemoteData() [3/3]

void compactRemoteData ( const labelUList remoteElements,
labelList oldToNewSub,
labelList oldToNewConstruct,
const label  localSize = -1,
const int  tag = UPstream::msgType() 
)

Compact send/receive maps based on selection of remote (receive) elements.

The resulting compact numbering:

  • subMap (and oldToNewSub) : numbered in simple ascending order.
  • constructMap (and oldToNewConstruct) : will follow the original ordering of remoteElements.
Warning
ill-defined behaviour if remoteElements contains duplicates.

Definition at line 815 of file mapDistributeBaseSubset.C.

◆ distribute() [1/9]

void distribute ( const UPstream::commsTypes  commsType,
const List< labelPair > &  schedule,
const label  constructSize,
const labelListList subMap,
const bool  subHasFlip,
const labelListList constructMap,
const bool  constructHasFlip,
List< T > &  field,
const T nullValue,
const CombineOp &  cop,
const NegateOp &  negOp,
const int  tag = UPstream::msgType(),
const label  comm = UPstream::worldComm 
)
static

Distribute combine data with specified combine operation and negate operator (for flips).

If multiple processors write to same position, contributions are added using the combine cop.

Note
schedule only used for UPstream::commsTypes::scheduled, others just use send-to-all, receive-from-all.

Definition at line 439 of file mapDistributeBaseTemplates.C.

References Foam::abort(), UList< T >::cdata_bytes(), UList< T >::data_bytes(), Foam::FatalError, FatalErrorInFunction, field(), PstreamBuffers::finishedSends(), os(), DynamicList< T, SizeMin >::push_back(), Foam::blockMeshTools::read(), List< T >::resize_nocopy(), UList< T >::size(), UList< T >::size_bytes(), and Foam::vtk::write().

Referenced by Field< Foam::vector >::autoMap(), faceAreaWeightAMI::calculate(), mapDistribute::distribute(), mappedPatchBase::distribute(), distributedTriSurfaceMesh::findNearest(), distributedTriSurfaceMesh::getVolumeType(), Field< Foam::vector >::map(), mappedPatchBase::reverseDistribute(), and streamLineBase::writeToFile().

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

◆ distribute() [2/9]

void distribute ( const UPstream::commsTypes  commsType,
const List< labelPair > &  schedule,
const label  constructSize,
const labelListList subMap,
const bool  subHasFlip,
const labelListList constructMap,
const bool  constructHasFlip,
List< T > &  field,
const NegateOp &  negOp,
const int  tag = UPstream::msgType(),
const label  comm = UPstream::worldComm 
)
static

Distribute assign data with specified negate operator (for flips). Uses assignment for combine operation.

Note
schedule only used for UPstream::commsTypes::scheduled, others just use send-to-all, receive-from-all.

Definition at line 931 of file mapDistributeBaseTemplates.C.

References Foam::abort(), UList< T >::cdata_bytes(), UList< T >::data_bytes(), Foam::FatalError, FatalErrorInFunction, field(), PstreamBuffers::finishedSends(), os(), DynamicList< T, SizeMin >::push_back(), Foam::blockMeshTools::read(), List< T >::resize_nocopy(), UList< T >::size(), UList< T >::size_bytes(), and Foam::vtk::write().

Here is the call graph for this function:

◆ distribute() [3/9]

void distribute ( List< T > &  values,
const int  tag = UPstream::msgType() 
) const

Distribute List data using default commsType and the default flip/negate operator.

Definition at line 1582 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ distribute() [4/9]

void distribute ( DynamicList< T > &  values,
const int  tag = UPstream::msgType() 
) const

Distribute DynamicList data using default commsType and the default flip/negate operator.

Definition at line 1593 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ distribute() [5/9]

void distribute ( const UPstream::commsTypes  commsType,
List< T > &  values,
const int  tag = UPstream::msgType() 
) const

Distribute List data using specified commsType and the default flip/negate operator.

Definition at line 1552 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ distribute() [6/9]

void distribute ( const UPstream::commsTypes  commsType,
DynamicList< T > &  values,
const int  tag = UPstream::msgType() 
) const

Distribute DynamicList data using specified commsType and the default flip/negate operator.

Definition at line 1564 of file mapDistributeBaseTemplates.C.

References UList< T >::size(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ distribute() [7/9]

void distribute ( List< T > &  values,
const NegateOp &  negOp,
const int  tag = UPstream::msgType() 
) const

Distribute data using default commsType and the specified negate operator (for flips).

Definition at line 1537 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ distribute() [8/9]

void distribute ( const UPstream::commsTypes  commsType,
List< T > &  values,
const NegateOp &  negOp,
const int  tag = UPstream::msgType() 
) const

Distribute data using specified commsType and the specified negate operator (for flips).

Accepts a nullValue to initialize unmapped elements (ie, when the constructSize is larger than the number of mapped elements).

Definition at line 1482 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ distribute() [9/9]

void distribute ( const UPstream::commsTypes  commsType,
const T nullValue,
List< T > &  values,
const NegateOp &  negOp,
const int  tag = UPstream::msgType() 
) const

Distribute data using specified commsType and the specified negate operator (for flips).

Accepts a nullValue to initialize unmapped elements (ie, when the constructSize is larger than the number of mapped elements).

Definition at line 1508 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ reverseDistribute() [1/5]

void reverseDistribute ( const label  constructSize,
List< T > &  values,
const int  tag = UPstream::msgType() 
) const

Reverse distribute data using default commsType and the default flip/negate operator.

Definition at line 1682 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Referenced by mapDistribute::reverseDistribute().

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

◆ reverseDistribute() [2/5]

void reverseDistribute ( const label  constructSize,
const T nullValue,
List< T > &  values,
const int  tag = UPstream::msgType() 
) const

Reverse distribute data using default commsType and the default flip/negate operator.

Accepts a nullValue to initialize unmapped elements (ie, when the constructSize is larger than the subMap).

Definition at line 1700 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ reverseDistribute() [3/5]

void reverseDistribute ( const UPstream::commsTypes  commsType,
const label  constructSize,
List< T > &  values,
const int  tag = UPstream::msgType() 
) const

Reverse distribute data using specified commsType and the default flip/negate operator.

Definition at line 1604 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ reverseDistribute() [4/5]

void reverseDistribute ( const UPstream::commsTypes  commsType,
const label  constructSize,
List< T > &  values,
const NegateOp &  negOp,
const int  tag = UPstream::msgType() 
) const

Reverse distribute data using specified commsType and the specified flip/negate operator.

Definition at line 1624 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ reverseDistribute() [5/5]

void reverseDistribute ( const UPstream::commsTypes  commsType,
const label  constructSize,
const T nullValue,
List< T > &  values,
const int  tag = UPstream::msgType() 
) const

Reverse distribute data using specified commsType and the default flip/negate operator.

Accepts a nullValue to initialize unmapped elements (ie, when the constructSize is larger than the subMap).

Definition at line 1651 of file mapDistributeBaseTemplates.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ send() [1/3]

void send ( PstreamBuffers pBufs,
const List< T > &  field 
) const

Do all sends using PstreamBuffers.

Definition at line 1417 of file mapDistributeBaseTemplates.C.

References field(), PstreamBuffers::finishedSends(), os(), and UList< T >::size().

Here is the call graph for this function:

◆ receive() [1/3]

void receive ( PstreamBuffers pBufs,
List< T > &  field 
) const

Do all receives using PstreamBuffers.

Definition at line 1447 of file mapDistributeBaseTemplates.C.

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

Here is the call graph for this function:

◆ send() [2/3]

void send ( const labelListList subMap,
const bool  subHasFlip,
const labelListList constructMap,
const bool  constructHasFlip,
const UList< T > &  field,
labelRange sendRequests,
PtrList< List< T >> &  sendFields,
labelRange recvRequests,
PtrList< List< T >> &  recvFields,
const negateOp &  negOp,
const int  tag,
const label  comm 
)
static

Start all sends and receives (always non-blocking)

Parameters
sendRequestsThe send requests range
sendFieldsThe send fields storage
recvRequestsThe recv requests range
recvFieldsThe recv fields storage

Definition at line 140 of file mapDistributeBaseTemplates.C.

References UList< T >::cdata_bytes(), UList< T >::data_bytes(), UList< T >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, field(), Foam::blockMeshTools::read(), List< T >::resize_nocopy(), UList< T >::size(), IntRange< IntType >::size(), UList< T >::size_bytes(), IntRange< IntType >::start(), and Foam::vtk::write().

Here is the call graph for this function:

◆ send() [3/3]

void send ( const UList< T > &  field,
labelRange sendRequests,
PtrList< List< T >> &  sendFields,
labelRange recvRequests,
PtrList< List< T >> &  recvFields,
const int  tag = UPstream::msgType() 
) const

Start all sends and receives (always non-blocking)

Parameters
sendRequestsThe send requests range
sendFieldsThe send fields storage
recvRequestsThe recv requests range
recvFieldsThe recv fields storage

Definition at line 274 of file mapDistributeBaseTemplates.C.

References field().

Here is the call graph for this function:

◆ receive() [2/3]

void receive ( const label  constructSize,
const labelListList constructMap,
const bool  constructHasFlip,
const labelRange requests,
const UPtrList< List< T >> &  recvFields,
List< T > &  field,
const CombineOp &  cop,
const negateOp &  negOp,
const int  tag,
const label  comm 
)
static

Wait for (receive) requests to finish and consume.

Definition at line 301 of file mapDistributeBaseTemplates.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, field(), Foam::nl, DynamicList< T, SizeMin >::push_back(), UList< T >::size(), IntRange< IntType >::size(), and IntRange< IntType >::start().

Here is the call graph for this function:

◆ receive() [3/3]

void receive ( const labelRange requests,
const UPtrList< List< T >> &  recvFields,
List< T > &  field,
const int  tag = UPstream::msgType() 
) const

Wait for (receive) requests to finish and consume.

Definition at line 414 of file mapDistributeBaseTemplates.C.

References field().

Here is the call graph for this function:

◆ printLayout()

void printLayout ( Ostream os) const

Debug: print layout. Can only be used on maps with sorted.

storage (local data first, then non-local data)

Definition at line 304 of file mapDistributeBase.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::labelMax, Foam::labelMin, Foam::mag(), Foam::max(), Foam::min(), UPstream::myProcNo(), Foam::nl, UPstream::nProcs(), and os().

Referenced by mapDistribute::printLayout().

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

◆ operator=() [1/2]

void operator= ( const mapDistributeBase rhs)

Copy assignment.

Definition at line 1554 of file mapDistributeBase.C.

Referenced by mapDistribute::operator=().

Here is the caller graph for this function:

◆ operator=() [2/2]

void operator= ( mapDistributeBase &&  rhs)

Move assignment.

Definition at line 1571 of file mapDistributeBase.C.

◆ info()

InfoProxy<mapDistributeBase> info ( ) const
inlinenoexcept

Return info proxy, used to print summary information to a stream.

Definition at line 1386 of file mapDistributeBase.H.

◆ readDict()

void readDict ( const dictionary dict)

Read entries from dictionary format.

Definition at line 94 of file mapDistributeBaseIO.C.

References dict, dictionary::get(), dictionary::readEntry(), and dictionary::subDict().

Referenced by mapDistribute::readDict().

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

◆ writeEntries()

void writeEntries ( Ostream os) const

Write entries in dictionary format.

Definition at line 116 of file mapDistributeBaseIO.C.

References Ostream::beginBlock(), Ostream::endBlock(), Foam::nl, os(), Ostream::writeEntry(), and Foam::writeMaps().

Referenced by mapDistribute::writeEntries().

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

◆ updateMesh()

void updateMesh ( const mapPolyMesh )
inline

No correction for topo change.

Definition at line 1417 of file mapDistributeBase.H.

References NotImplemented.

◆ compact() [1/2]

void compact ( const boolList remoteElemUsed,
const int  tag = UPstream::msgType() 
)

OpenFOAM-v2112 and earlier naming for compactRemoteData() using boolList.

Definition at line 1001 of file mapDistributeBaseSubset.C.

◆ compact() [2/2]

void compact ( const boolList remoteElemUsed,
const label  localSize,
labelList oldToNewSub,
labelList oldToNewConstruct,
const int  tag = UPstream::msgType() 
)

OpenFOAM-v2112 and earlier naming for compactRemoteData(). using boolList.

Definition at line 1012 of file mapDistributeBaseSubset.C.

◆ accessAndFlip() [3/3]

Foam::List<T> accessAndFlip ( const UList< T > &  values,
const labelUList map,
const bool  hasFlip,
const NegateOp &  negOp 
)

Definition at line 125 of file mapDistributeBaseTemplates.C.

References Foam::output(), UList< T >::size(), and Foam::HashTableOps::values().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
mapDistributeBase  
)
friend

Read plain content (not dictionary) from Istream.

◆ operator<<

Ostream& operator<< ( Ostream ,
const mapDistributeBase  
)
friend

Write plain content (not dictionary) to Ostream.


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