Class containing processor-to-processor mapping information. More...
#include <mapDistribute.H>


Classes | |
| class | transform |
| Default transformation behaviour. More... | |
| class | transformPosition |
| Default transformation behaviour for position. More... | |
Public Member Functions | |
| ClassName ("mapDistribute") | |
| mapDistribute () noexcept | |
| Default construct - uses worldComm. | |
| mapDistribute (const label comm) noexcept | |
| Default construct with specified communicator. | |
| mapDistribute (mapDistributeBase &&map) | |
| Move construct from base, no transforms. | |
| mapDistribute (const mapDistribute &map) | |
| Copy construct. | |
| mapDistribute (mapDistribute &&map) | |
| Move construct. | |
| mapDistribute (const dictionary &dict, const label comm=UPstream::worldComm) | |
| Read construct from dictionary. | |
| mapDistribute (const label constructSize, labelListList &&subMap, labelListList &&constructMap, labelListList &&transformElements, labelList &&transformStart, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
| Move construct from components. | |
| mapDistribute (const globalIndex &, labelList &untransformedElements, const globalIndexAndTransform &, const labelPairList &transformedElements, labelList &transformedIndices, List< Map< label > > &compactMap, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) | |
| Construct from list of (possibly remote) untransformed elements in globalIndex numbering (or -1) and (possibly remote) transformed elements in globalIndexAndTransform numbering. | |
| mapDistribute (const globalIndex &, labelListList &cellCells, const globalIndexAndTransform &, const List< labelPairList > &transformedElements, labelListList &transformedIndices, List< Map< label > > &compactMap, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) | |
| As above but with ListLists. | |
| mapDistribute (const UPtrList< const mapDistribute > &maps, const labelList &localRanks, const label newComm, const labelListList &newToOldRanks, labelList &startOfLocal, List< Map< label > > &compactMaps) | |
| Construct from multiple maps and processor collation. | |
| mapDistribute (Istream &is) | |
| Construct from Istream. | |
| autoPtr< mapDistribute > | clone () const |
| Clone. | |
| virtual | ~mapDistribute ()=default |
| Destructor. | |
| const labelListList & | transformElements () const noexcept |
| For every globalIndexAndTransform::transformPermutations gives the elements that need to be transformed. | |
| const labelList & | transformStart () const noexcept |
| Destination in constructMap for transformed elements. | |
| label | whichTransform (const label index) const |
| Find transform from transformElements. | |
| void | clear () |
| Reset to zero size, only retaining communicator. | |
| void | transfer (mapDistribute &map) |
| Transfer the contents of the argument and annul the argument. | |
| template<class T> | |
| void | distribute (List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Distribute List data using default commsType, default flip/negate operator. | |
| template<class T> | |
| void | distribute (DynamicList< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Distribute DynamicList data using default commsType, default flip/negate operator. | |
| template<class T> | |
| void | distribute (const UPstream::commsTypes commsType, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Distribute List data using specified commsType, default flip/negate operator. | |
| template<class T> | |
| void | distribute (const UPstream::commsTypes commsType, DynamicList< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Distribute DynamicList data using specified commsType, default flip/negate operator. | |
| template<class T, class NegateOp> | |
| void | distribute (List< T > &fld, const NegateOp &negOp, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Distribute List data using default commsType and the specified negate operator (for flips). | |
| template<class T, class NegateOp> | |
| void | distribute (const UPstream::commsTypes commsType, List< T > &fld, const NegateOp &negOp, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Distribute List data using specified commsType and the specified negate operator (for flips). | |
| template<class T> | |
| void | reverseDistribute (const label constructSize, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Reverse distribute data using default commsType. | |
| template<class T> | |
| void | reverseDistribute (const UPstream::commsTypes commsType, const label constructSize, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Reverse distribute data using specified commsType. | |
| template<class T> | |
| void | reverseDistribute (const label constructSize, const T &nullValue, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Reverse distribute data using default commsType. | |
| template<class T> | |
| void | reverseDistribute (const UPstream::commsTypes commsType, const label constructSize, const T &nullValue, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const |
| Reverse distribute data using specified commsType. | |
| template<class T, class TransformOp> | |
| void | distribute (const globalIndexAndTransform &, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const |
| Distribute with transforms. | |
| template<class T, class TransformOp> | |
| void | distribute (const UPstream::commsTypes commsType, const globalIndexAndTransform &, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const |
| Distribute with transforms. | |
| template<class T, class TransformOp> | |
| void | reverseDistribute (const globalIndexAndTransform &, const label constructSize, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const |
| Reverse distribute with transforms. | |
| template<class T, class TransformOp> | |
| void | reverseDistribute (const UPstream::commsTypes commsType, const globalIndexAndTransform &, const label constructSize, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const |
| Reverse distribute with transforms. | |
| template<class T, class TransformOp> | |
| void | reverseDistribute (const globalIndexAndTransform &, const label constructSize, const T &nullValue, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const |
| Reverse distribute with transforms. | |
| template<class T, class TransformOp> | |
| void | reverseDistribute (const UPstream::commsTypes commsType, const globalIndexAndTransform &, const label constructSize, const T &nullValue, List< T > &fld, const TransformOp &top, const int tag=UPstream::msgType()) const |
| Reverse distribute with transforms. | |
| void | printLayout (Ostream &os) const |
| Debug: print layout. Can only be used on maps with sorted. | |
| void | operator= (const mapDistribute &rhs) |
| Copy assignment. | |
| void | operator= (mapDistribute &&rhs) |
| Move assignment. | |
| void | readDict (const dictionary &dict) |
| Read entries from dictionary format. | |
| void | writeEntries (Ostream &os) const |
| Write entries in dictionary format. | |
| void | updateMesh (const mapPolyMesh &) |
| No correction for topo change. | |
| mapDistributeBase () noexcept | |
| Inherit constructors. | |
| mapDistributeBase (const label comm) noexcept | |
| Inherit constructors. | |
| mapDistributeBase (const mapDistributeBase &map) | |
| Inherit constructors. | |
| mapDistributeBase (mapDistributeBase &&map) | |
| Inherit constructors. | |
| mapDistributeBase (const dictionary &dict, const label comm=UPstream::worldComm) | |
| Inherit constructors. | |
| mapDistributeBase (const label constructSize, labelListList &&subMap, labelListList &&constructMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
| Inherit constructors. | |
| mapDistributeBase (const labelUList &sendProcs, const labelUList &recvProcs, const label comm=UPstream::worldComm) | |
| Inherit constructors. | |
| mapDistributeBase (const globalIndex &, labelList &elements, List< Map< label > > &compactMap, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) | |
| Inherit constructors. | |
| mapDistributeBase (const globalIndex &, labelListList &cellCells, List< Map< label > > &compactMap, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) | |
| Inherit constructors. | |
| mapDistributeBase (const layoutTypes constructLayout, labelListList &&subMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
| Inherit constructors. | |
| mapDistributeBase (labelListList &&subMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
| Inherit constructors. | |
| mapDistributeBase (const UPtrList< const mapDistributeBase > &maps, const labelList &localRanks, const label newComm, const labelListList &newToOldRanks, labelList &startOfLocal, List< Map< label > > &compactMaps) | |
| Inherit constructors. | |
| mapDistributeBase (Istream &is) | |
| Inherit constructors. | |
| Public Member Functions inherited from mapDistributeBase | |
| ClassName ("mapDistributeBase") | |
| mapDistributeBase () noexcept | |
| Default construct (uses worldComm). | |
| mapDistributeBase (const label comm) noexcept | |
| Default construct with specified communicator. | |
| mapDistributeBase (const mapDistributeBase &map) | |
| Copy construct. | |
| mapDistributeBase (mapDistributeBase &&map) | |
| Move construct. | |
| mapDistributeBase (const dictionary &dict, const label comm=UPstream::worldComm) | |
| Read construct from dictionary. | |
| 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. | |
| 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. | |
| 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). | |
| 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. | |
| 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. | |
| mapDistributeBase (labelListList &&subMap, const bool subHasFlip=false, const bool constructHasFlip=false, const label comm=UPstream::worldComm) | |
| Construct from my elements to send. | |
| 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. | |
| mapDistributeBase (Istream &is) | |
| Construct from Istream. | |
| label | constructSize () const noexcept |
| Constructed data size. | |
| label & | constructSize () noexcept |
| Constructed data size. | |
| const labelListList & | subMap () const noexcept |
| From subsetted data back to original data. | |
| labelListList & | subMap () noexcept |
| From subsetted data back to original data. | |
| const labelListList & | constructMap () const noexcept |
| From subsetted data to new reconstructed data. | |
| labelListList & | constructMap () noexcept |
| From subsetted data to new reconstructed data. | |
| bool | subHasFlip () const noexcept |
| Does subMap include a sign. | |
| bool & | subHasFlip () noexcept |
| Does subMap include a sign. | |
| bool | constructHasFlip () const noexcept |
| Does constructMap include a sign. | |
| bool & | constructHasFlip () noexcept |
| Does constructMap include a sign. | |
| label | comm () const noexcept |
| The communicator used. | |
| label | nMaps () const noexcept |
| The number of sub-lists within the maps. | |
| labelList | subMapSizes () const |
| The sizes of the subMap lists. | |
| labelList | constructMapSizes () const |
| The sizes of the constructMap lists. | |
| label | subMapTotalSize () const noexcept |
| The sum of the subMap list sizes. | |
| label | constructMapTotalSize () const noexcept |
| The sum of the constructMap list sizes. | |
| const List< labelPair > & | schedule () const |
| Return a schedule. Demand driven. See above. | |
| const List< labelPair > & | whichSchedule (const UPstream::commsTypes commsType) const |
| Return real or dummy schedule depending on the communication type. | |
| void | clear () |
| Reset to zero size, only retaining communicator. | |
| void | transfer (mapDistributeBase &rhs) |
| Transfer the contents of the argument and annul the argument. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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). | |
| 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). | |
| 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). | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| template<class T> | |
| void | send (PstreamBuffers &pBufs, const UList< T > &field) const |
| Do all sends using PstreamBuffers. | |
| template<class T> | |
| void | receive (PstreamBuffers &pBufs, List< T > &field) const |
| Do all receives using PstreamBuffers. | |
| 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). | |
| 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. | |
| void | printLayout (Ostream &os) const |
| Debug: print layout. Can only be used on maps with sorted. | |
| void | operator= (const mapDistributeBase &rhs) |
| Copy assignment. | |
| void | operator= (mapDistributeBase &&rhs) |
| Move assignment. | |
| InfoProxy< mapDistributeBase > | info () const noexcept |
| Return info proxy, used to print summary information to a stream. | |
| void | readDict (const dictionary &dict) |
| Read entries from dictionary format. | |
| void | writeEntries (Ostream &os) const |
| Write entries in dictionary format. | |
| void | updateMesh (const mapPolyMesh &) |
| No correction for topo change. | |
| void | compact (const boolList &remoteElemUsed, const int tag=UPstream::msgType()) |
| OpenFOAM-v2112 and earlier naming for compactRemoteData() using boolList. | |
| 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. | |
| template<class T, class NegateOp> | |
| Foam::List< T > | accessAndFlip (const UList< T > &values, const labelUList &map, const bool hasFlip, const NegateOp &negOp) |
Friends | |
| Istream & | operator>> (Istream &, mapDistribute &) |
| Read plain content (not dictionary) from Istream. | |
| Ostream & | operator<< (Ostream &, const mapDistribute &) |
| Write plain content (not dictionary) to Ostream. | |
Additional Inherited Members | |
| Public Types inherited from mapDistributeBase | |
| enum class | layoutTypes : char { linear , localFirst } |
| The map layout (eg, of the constructMap). More... | |
| Static Public Member Functions inherited from mapDistributeBase | |
| 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. | |
| 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. | |
| static label | countUnmapped (const labelUList &elements, const labelListList &maps, const bool hasFlip) |
| Count the number of unmapped elements. | |
| static List< labelPair > | schedule (const labelListList &subMap, const labelListList &constructMap, const int tag, const label comm=UPstream::worldComm) |
| Calculate a communication schedule. See above. | |
| static label | renumber (const globalIndex &, const label comm, const List< Map< label > > &compactMap, const label globalElement) |
| Helper for construct from globalIndex. Renumbers element. | |
| 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. | |
| 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. | |
| 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. | |
| template<class T, class CombineOp, class NegateOp> | |
| static void | distribute (const UPstream::commsTypes commsType, const UList< 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). | |
| template<class T, class CombineOp, class NegateOp> | |
| static void | distribute (const UPstream::commsTypes commsType, const UList< labelPair > &schedule, const UList< T > &inField, const labelListList &subMap, const bool subHasFlip, List< T > &field, const label constructSize, const labelListList &constructMap, const bool constructHasFlip, 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). | |
| template<class T, class NegateOp> | |
| static void | distribute (const UPstream::commsTypes commsType, const UList< 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. | |
| 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). | |
| 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. | |
| Protected Member Functions inherited from mapDistributeBase | |
| void | calcCompactAddressing (const globalIndex &globalNumbering, const labelUList &elements, List< Map< label > > &compactMap) const |
| Construct per processor compact addressing of the global elements. | |
| 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 inherited from mapDistributeBase | |
| static void | checkReceivedSize (const label proci, const label expectedSize, const label receivedSize) |
| Fatal if expected != received size. | |
| static label | getMappedSize (const labelListList &maps, const bool hasFlip) |
| Scan the maps for the max addressed index. | |
| 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. | |
| 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. | |
| template<class T, class CombineOp, class NegateOp> | |
| static void | flipAndCombine (UList< 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. | |
| template<class T, class NegateOp> | |
| static void | accessAndFlip (UList< 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. | |
| template<class T, class NegateOp> | |
| static List< T > | accessAndFlip (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. | |
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.
It rewrites the input global indices into indices into the constructed data.
Any distribute with transforms is now done as: 1. exchange data with other processors and receive these into the slots for that processor 2. for all transformations transform a subset of the data according to transformElements_[transformI] and store this starting from transformStart_[transformI]
In the same way a reverse distribute will 1. apply the inverse transform to the data starting at transformStart_[transformI] and copy the result back into the transformElements_[transformI]. These might be local or remote slots. 2. the data in the remote slots will now be sent back to the correct location in the originating processor.
E.g. a map to handle
on e.g. processor 1 out of 2:
+——+ <- transformStart[2] | | | | <- transform2 applied to data in local or remote slots | | +——+ <- transformStart[1] | | | | <- transform1 applied to data in local or remote slots | | +——+ <- transformStart[1] | | | | <- transform0 applied to data in local or remote slots | | +——+ <- transformStart[0] | | | | <- data from proc2 | | +——+ | | | | <- data from proc0 | | +——+ <- mesh.nPoints() | | | | | | +——+ 0
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)
Definition at line 156 of file mapDistribute.H.
|
noexcept |
Default construct - uses worldComm.
Definition at line 69 of file mapDistribute.C.
References mapDistributeBase(), and Foam::noexcept.
Referenced by ClassName(), IOmapDistribute::IOmapDistribute(), IOmapDistribute::IOmapDistribute(), mapDistribute(), mapDistribute(), mapDistribute(), operator<<, operator=(), operator=(), operator>>, transfer(), IOmapDistribute::TypeName(), and ~mapDistribute().


|
explicitnoexcept |
Default construct with specified communicator.
Definition at line 75 of file mapDistribute.C.
References mapDistributeBase::comm(), mapDistributeBase(), and Foam::noexcept.

|
explicit |
Move construct from base, no transforms.
Definition at line 81 of file mapDistribute.C.
References mapDistributeBase().

|
explicit |
Copy construct.
Definition at line 87 of file mapDistribute.C.
References mapDistribute(), and mapDistributeBase().

|
explicit |
Move construct.
Definition at line 95 of file mapDistribute.C.
References mapDistribute(), and transfer().

|
explicit |
Read construct from dictionary.
Definition at line 26 of file mapDistributeIO.C.
References mapDistributeBase::comm(), dict, mapDistribute(), and readDict().

| mapDistribute | ( | const label | constructSize, |
| labelListList && | subMap, | ||
| labelListList && | constructMap, | ||
| labelListList && | transformElements, | ||
| labelList && | transformStart, | ||
| const bool | subHasFlip = false, | ||
| const bool | constructHasFlip = false, | ||
| const label | comm = UPstream::worldComm ) |
Move construct from components.
Definition at line 103 of file mapDistribute.C.
References mapDistributeBase::comm(), mapDistributeBase::constructHasFlip(), mapDistributeBase::constructMap(), mapDistributeBase::constructSize(), mapDistributeBase(), mapDistributeBase::subHasFlip(), mapDistributeBase::subMap(), transformElements(), and transformStart().

| mapDistribute | ( | const globalIndex & | globalNumbering, |
| labelList & | untransformedElements, | ||
| const globalIndexAndTransform & | globalTransforms, | ||
| const labelPairList & | transformedElements, | ||
| labelList & | transformedIndices, | ||
| List< Map< label > > & | compactMap, | ||
| const int | tag = UPstream::msgType(), | ||
| const label | comm = UPstream::worldComm ) |
Construct from list of (possibly remote) untransformed elements in globalIndex numbering (or -1) and (possibly remote) transformed elements in globalIndexAndTransform numbering.
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 129 of file mapDistribute.C.
References mapDistributeBase::calcCompactAddressing(), mapDistributeBase::comm(), mapDistributeBase::constructSize(), mapDistributeBase::exchangeAddressing(), forAll, globalIndexAndTransform::index(), mapDistributeBase(), UPstream::myProcNo(), n, Foam::Pout, printLayout(), globalIndexAndTransform::processor(), List< T >::resize_nocopy(), UList< T >::size(), globalIndexAndTransform::transformIndex(), globalIndexAndTransform::transformPermutations(), and Foam::Zero.

| mapDistribute | ( | const globalIndex & | globalNumbering, |
| labelListList & | cellCells, | ||
| const globalIndexAndTransform & | globalTransforms, | ||
| const List< labelPairList > & | transformedElements, | ||
| labelListList & | transformedIndices, | ||
| List< Map< label > > & | compactMap, | ||
| const int | tag = UPstream::msgType(), | ||
| const label | comm = UPstream::worldComm ) |
As above but with ListLists.
Definition at line 236 of file mapDistribute.C.
References mapDistributeBase::calcCompactAddressing(), mapDistributeBase::comm(), mapDistributeBase::constructSize(), mapDistributeBase::exchangeAddressing(), forAll, globalIndexAndTransform::index(), mapDistributeBase(), UPstream::myProcNo(), n, Foam::Pout, printLayout(), globalIndexAndTransform::processor(), List< T >::resize_nocopy(), UList< T >::size(), globalIndexAndTransform::transformIndex(), globalIndexAndTransform::transformPermutations(), and Foam::Zero.

| mapDistribute | ( | const UPtrList< const mapDistribute > & | 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
Definition at line 354 of file mapDistribute.C.
References mapDistributeBase().

|
explicit |
Construct from Istream.
Definition at line 34 of file mapDistributeIO.C.
|
virtualdefault |
| ClassName | ( | "mapDistribute" | ) |
References clone(), mapDistributeBase::comm(), mapDistributeBase::constructHasFlip(), mapDistributeBase::constructMap(), mapDistributeBase::constructSize(), dict, mapDistribute(), mapDistributeBase(), mapDistributeBase::mapDistributeBase(), Foam::noexcept, mapDistributeBase::subHasFlip(), mapDistributeBase::subMap(), transformElements(), and transformStart().

| Foam::autoPtr< Foam::mapDistribute > clone | ( | ) | const |
Clone.
Definition at line 380 of file mapDistribute.C.
References autoPtr< T >::New().
Referenced by AMICache::addToCache(), and ClassName().


|
inlinenoexcept |
For every globalIndexAndTransform::transformPermutations gives the elements that need to be transformed.
Definition at line 509 of file mapDistribute.H.
References Foam::noexcept, and transformElements().
Referenced by ClassName(), mapDistribute(), and transformElements().


|
inlinenoexcept |
Destination in constructMap for transformed elements.
Definition at line 517 of file mapDistribute.H.
References Foam::noexcept.
Referenced by ClassName(), and mapDistribute().

| Foam::label whichTransform | ( | const label | index | ) | const |
Find transform from transformElements.
Definition at line 388 of file mapDistribute.C.
References Foam::findLower().

| void clear | ( | ) |
Reset to zero size, only retaining communicator.
Definition at line 394 of file mapDistribute.C.
References mapDistributeBase::clear().

| void transfer | ( | mapDistribute & | map | ) |
Transfer the contents of the argument and annul the argument.
Definition at line 402 of file mapDistribute.C.
References mapDistribute(), Foam::rhs(), and mapDistributeBase::transfer().
Referenced by IOmapDistribute::IOmapDistribute(), mapDistribute(), and operator=().


| void distribute | ( | List< T > & | fld, |
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Distribute List data using default commsType, default flip/negate operator.
Definition at line 171 of file mapDistributeTemplates.C.
References UPstream::defaultCommsType, distribute(), and fld().
Referenced by AMIInterpolation::agglomerate(), LeastSquaresGrad< Type, Stencil >::calcGrad(), extendedCellToFaceStencil::collectData(), extendedFaceToCellStencil::collectData(), hexRef8Data::distribute(), distribute(), distribute(), distribute(), distribute(), distribute(), distribute(), distribute(), cellVolumeWeight::findHoles(), inverseDistance::findHoles(), distributedTriSurfaceMesh::findNearest(), distributedTriSurfaceMesh::findNearest(), distributedTriSurfaceMesh::getNormal(), distributedTriSurfaceMesh::getVolumeType(), globalIndexAndTransform::globalIndexAndTransform(), AMIInterpolation::interpolate(), meshToMesh::mapSrcToTgt(), meshToMesh::mapSrcToTgt(), meshToMesh::mapTgtToSrc(), meshToMesh::mapTgtToSrc(), globalMeshData::mergePoints(), semiPermeableBaffleMassFractionFvPatchScalarField::phiY(), PatchTools::pointNormals(), PatchTools::pointNormals(), sampledPatchInternalField::sampleOnPoints(), globalMeshData::syncData(), globalMeshData::syncData(), pointConstraints::syncUntransformedData(), cellVolumeWeight::update(), inverseDistance::update(), trackingInverseDistance::update(), thermalBaffle1DFvPatchScalarField< solidType >::updateCoeffs(), and Sampled< Type >::value().


| void distribute | ( | DynamicList< T > & | fld, |
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Distribute DynamicList data using default commsType, default flip/negate operator.
Definition at line 200 of file mapDistributeTemplates.C.
References UPstream::defaultCommsType, distribute(), and fld().

| void distribute | ( | const UPstream::commsTypes | commsType, |
| List< T > & | fld, | ||
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Distribute List data using specified commsType, default flip/negate operator.
Definition at line 158 of file mapDistributeTemplates.C.
References distribute(), and fld().

| void distribute | ( | const UPstream::commsTypes | commsType, |
| DynamicList< T > & | fld, | ||
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Distribute DynamicList data using specified commsType, default flip/negate operator.
Definition at line 183 of file mapDistributeTemplates.C.
References distribute(), and fld().

| void distribute | ( | List< T > & | fld, |
| const NegateOp & | negOp, | ||
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Distribute List data using default commsType and the specified negate operator (for flips).
Definition at line 145 of file mapDistributeTemplates.C.
References UPstream::defaultCommsType, distribute(), and fld().

| void distribute | ( | const UPstream::commsTypes | commsType, |
| List< T > & | fld, | ||
| const NegateOp & | negOp, | ||
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Distribute List data using specified commsType and the specified negate operator (for flips).
Fill in transformed slots with copies
Definition at line 123 of file mapDistributeTemplates.C.
References mapDistributeBase::distribute(), and fld().

| void reverseDistribute | ( | const label | constructSize, |
| List< T > & | fld, | ||
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Reverse distribute data using default commsType.
Definition at line 231 of file mapDistributeTemplates.C.
References mapDistributeBase::constructSize(), UPstream::defaultCommsType, fld(), and reverseDistribute().
Referenced by distributedTriSurfaceMesh::findNearest(), distributedTriSurfaceMesh::getField(), distributedTriSurfaceMesh::getNormal(), distributedTriSurfaceMesh::getRegion(), mappedPatchFieldBase< Type >::mappedField(), globalMeshData::mergePoints(), globalMeshData::mergePoints(), PatchTools::pointNormals(), PatchTools::pointNormals(), volPointInterpolationAdjoint::pushUntransformedData(), reverseDistribute(), reverseDistribute(), reverseDistribute(), reverseDistribute(), reverseDistribute(), reverseDistribute(), sampledPatchInternalField::sampleOnPoints(), globalMeshData::syncData(), globalMeshData::syncData(), pointConstraints::syncUntransformedData(), Sampled< Type >::value(), and fvMeshTools::writeProcAddressing().


| void reverseDistribute | ( | const UPstream::commsTypes | commsType, |
| const label | constructSize, | ||
| List< T > & | fld, | ||
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Reverse distribute data using specified commsType.
Definition at line 212 of file mapDistributeTemplates.C.
References mapDistributeBase::constructSize(), fld(), and mapDistributeBase::reverseDistribute().

| void reverseDistribute | ( | const label | constructSize, |
| const T & | nullValue, | ||
| List< T > & | fld, | ||
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Reverse distribute data using default commsType.
Since constructSize might be larger than supplied size supply a nullValue
Definition at line 278 of file mapDistributeTemplates.C.
References mapDistributeBase::constructSize(), UPstream::defaultCommsType, fld(), reverseDistribute(), and Foam::T().

| void reverseDistribute | ( | const UPstream::commsTypes | commsType, |
| const label | constructSize, | ||
| const T & | nullValue, | ||
| List< T > & | fld, | ||
| const bool | dummyTransform = true, | ||
| const int | tag = UPstream::msgType() ) const |
Reverse distribute data using specified commsType.
Since constructSize might be larger than supplied size supply a nullValue
Definition at line 251 of file mapDistributeTemplates.C.
References mapDistributeBase::constructSize(), fld(), mapDistributeBase::reverseDistribute(), and Foam::T().

| void distribute | ( | const globalIndexAndTransform & | git, |
| List< T > & | fld, | ||
| const TransformOp & | top, | ||
| const int | tag = UPstream::msgType() ) const |
Distribute with transforms.
Definition at line 318 of file mapDistributeTemplates.C.
References UPstream::defaultCommsType, distribute(), and fld().

| void distribute | ( | const UPstream::commsTypes | commsType, |
| const globalIndexAndTransform & | git, | ||
| List< T > & | fld, | ||
| const TransformOp & | top, | ||
| const int | tag = UPstream::msgType() ) const |
Distribute with transforms.
Definition at line 300 of file mapDistributeTemplates.C.
References distribute(), and fld().

| void reverseDistribute | ( | const globalIndexAndTransform & | git, |
| const label | constructSize, | ||
| List< T > & | fld, | ||
| const TransformOp & | top, | ||
| const int | tag = UPstream::msgType() ) const |
Reverse distribute with transforms.
Definition at line 353 of file mapDistributeTemplates.C.
References mapDistributeBase::constructSize(), fld(), and reverseDistribute().

| void reverseDistribute | ( | const UPstream::commsTypes | commsType, |
| const globalIndexAndTransform & | git, | ||
| const label | constructSize, | ||
| List< T > & | fld, | ||
| const TransformOp & | top, | ||
| const int | tag = UPstream::msgType() ) const |
Reverse distribute with transforms.
Definition at line 332 of file mapDistributeTemplates.C.
References mapDistributeBase::constructSize(), fld(), and reverseDistribute().

| void reverseDistribute | ( | const globalIndexAndTransform & | git, |
| const label | constructSize, | ||
| const T & | nullValue, | ||
| List< T > & | fld, | ||
| const TransformOp & | top, | ||
| const int | tag = UPstream::msgType() ) const |
Reverse distribute with transforms.
Definition at line 403 of file mapDistributeTemplates.C.
References mapDistributeBase::constructSize(), UPstream::defaultCommsType, fld(), reverseDistribute(), and Foam::T().

| void reverseDistribute | ( | const UPstream::commsTypes | commsType, |
| const globalIndexAndTransform & | git, | ||
| const label | constructSize, | ||
| const T & | nullValue, | ||
| List< T > & | fld, | ||
| const TransformOp & | top, | ||
| const int | tag = UPstream::msgType() ) const |
Reverse distribute with transforms.
Definition at line 373 of file mapDistributeTemplates.C.
References mapDistributeBase::constructSize(), fld(), reverseDistribute(), and Foam::T().

| 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 36 of file mapDistribute.C.
References Foam::endl(), forAll, Foam::nl, os(), and mapDistributeBase::printLayout().
Referenced by mapDistribute(), and mapDistribute().


| void operator= | ( | const mapDistribute & | rhs | ) |
Copy assignment.
Definition at line 417 of file mapDistribute.C.
References mapDistribute(), mapDistributeBase::operator=(), and Foam::rhs().
Referenced by IOmapDistribute::IOmapDistribute().


| void operator= | ( | mapDistribute && | rhs | ) |
Move assignment.
Definition at line 430 of file mapDistribute.C.
References mapDistribute(), Foam::rhs(), and transfer().

| void readDict | ( | const dictionary & | dict | ) |
Read entries from dictionary format.
Definition at line 42 of file mapDistributeIO.C.
References dict, mapDistributeBase::readDict(), and dictionary::readIfPresent().
Referenced by mapDistribute().


| void writeEntries | ( | Ostream & | os | ) | const |
Write entries in dictionary format.
Definition at line 62 of file mapDistributeIO.C.
References Foam::nl, os(), and mapDistributeBase::writeEntries().

|
inline |
No correction for topo change.
Definition at line 806 of file mapDistribute.H.
References NotImplemented.
|
noexcept |
Inherit constructors.
Definition at line 447 of file mapDistributeBase.C.
Referenced by ClassName(), mapDistribute(), mapDistribute(), mapDistribute(), mapDistribute(), mapDistribute(), mapDistribute(), mapDistribute(), and mapDistribute().

|
explicitnoexcept |
Inherit constructors.
Definition at line 452 of file mapDistributeBase.C.
References globalIndex::isLocal(), and globalIndex::whichProcID().

| mapDistributeBase | ( | const mapDistributeBase & | map | ) |
Inherit constructors.
Definition at line 457 of file mapDistributeBase.C.
| mapDistributeBase | ( | mapDistributeBase && | map | ) |
Inherit constructors.
Definition at line 462 of file mapDistributeBase.C.
|
explicit |
Inherit constructors.
Definition at line 467 of file mapDistributeBaseIO.C.
| mapDistributeBase | ( | const label | constructSize, |
| labelListList && | subMap, | ||
| labelListList && | constructMap, | ||
| const bool | subHasFlip = false, | ||
| const bool | constructHasFlip = false, | ||
| const label | comm = UPstream::worldComm ) |
Inherit constructors.
Definition at line 476 of file mapDistributeBase.C.
References UList< T >::size().

| mapDistributeBase | ( | const labelUList & | sendProcs, |
| const labelUList & | recvProcs, | ||
| const label | comm = UPstream::worldComm ) |
Inherit constructors.
Definition at line 493 of file mapDistributeBase.C.
| mapDistributeBase | ( | const globalIndex & | globalNumbering, |
| labelList & | elements, | ||
| List< Map< label > > & | compactMap, | ||
| const int | tag = UPstream::msgType(), | ||
| const label | comm = UPstream::worldComm ) |
Inherit constructors.
Definition at line 509 of file mapDistributeBase.C.
References forAllIters, and List< T >::setSize().

| mapDistributeBase | ( | const globalIndex & | globalNumbering, |
| labelListList & | cellCells, | ||
| List< Map< label > > & | compactMap, | ||
| const int | tag = UPstream::msgType(), | ||
| const label | comm = UPstream::worldComm ) |
Inherit constructors.
Definition at line 526 of file mapDistributeBase.C.
|
explicit |
Inherit constructors.
Definition at line 539 of file mapDistributeBase.C.
References Foam::renumber().

|
explicit |
Inherit constructors.
Definition at line 554 of file mapDistributeBase.C.
| mapDistributeBase | ( | const UPtrList< const mapDistributeBase > & | maps, |
| const labelList & | localRanks, | ||
| const label | newComm, | ||
| const labelListList & | newToOldRanks, | ||
| labelList & | startOfLocal, | ||
| List< Map< label > > & | compactMaps ) |
Inherit constructors.
Definition at line 575 of file mapDistributeBase.C.
|
explicit |
Inherit constructors.
Definition at line 589 of file mapDistributeBaseIO.C.
|
friend |
Read plain content (not dictionary) from Istream.
References mapDistribute().
|
friend |
Write plain content (not dictionary) to Ostream.
References mapDistribute().