Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from different MPI ranks. These offsets can be used to define a unique (global) indexing number. More...
#include <globalIndex.H>
Classes | |
| struct | gatherNone |
| Dispatch tag: Construct with a single (local size) entry, no communication. More... | |
| struct | gatherOnly |
| Dispatch tag: Construct 'one-sided' from local sizes, using gather but no broadcast. More... | |
| struct | gatherNonLocal |
| Dispatch tag: Construct 'one-sided' from the non-master local sizes using gather but no broadcast. More... | |
| class | const_iterator |
| Forward input iterator with const access that is used to iterate across the globalIndex offsets() table. More... | |
Public Types | |
| typedef label | value_type |
| Type of values contained. | |
| typedef label | size_type |
| The type that can represent the size. | |
Public Member Functions | |
| globalIndex () noexcept=default | |
| Default construct (empty). | |
| globalIndex (const labelUList &listOffsets) | |
| Copy construct from a list of offsets. No communication required. | |
| globalIndex (labelList &&listOffsets) | |
| Move construct from a list of offsets. No communication required. | |
| globalIndex (globalIndex::gatherNone, const labelUList &localSizes) | |
| Construct from a list of sizes and calculate the offsets. No communication required. | |
| globalIndex (label localSize, const label comm=UPstream::worldComm, const bool parallel=UPstream::parRun()) | |
| Construct from local size, using gather/broadcast with default/specified communicator if parallel. | |
| globalIndex (globalIndex::gatherNone, label localSize, int communicator=-1) | |
| Construct with a single (local size) entry, no communication. | |
| globalIndex (globalIndex::gatherOnly, label localSize, const label comm=UPstream::worldComm) | |
| Construct 'one-sided' from local sizes. Uses UPstream::listGatherValues, but no broadcast. Will be empty on non-master processes. | |
| globalIndex (globalIndex::gatherNonLocal, label localSize, const label comm=UPstream::worldComm) | |
| Construct 'one-sided' from the non-master local sizes (ie, master size is treated as 0). Uses UPstream::listGatherValues, but no broadcast. Will be empty on non-master processes. | |
| globalIndex (Istream &is) | |
| Construct from Istream. No communication required. | |
| bool | empty () const noexcept |
| Check for default constructed or total-size == 0. | |
| label | length () const noexcept |
| The number of items covered by the offsets. | |
| label | size () const noexcept |
| Global sum of localSizes. Same as totalSize(). | |
| label | span () const noexcept |
| The span size covered by the offsets, zero if empty. | |
| label | totalSize () const noexcept |
| The total addressed size, which corresponds to the end offset and also the sum of all localSizes. | |
| labelList | sizes () const |
| The local sizes. Same as localSizes(). | |
| const labelUList | localStarts () const |
| The local starts. | |
| labelList | localSizes () const |
| The local sizes. | |
| List< labelRange > | ranges () const |
| Return start/size ranges for all data. | |
| label | maxSize () const |
| Global max of localSizes. | |
| const labelList & | offsets () const noexcept |
| Const-access to the offsets. | |
| labelList & | offsets () noexcept |
| Write-access to the offsets, for changing after construction. | |
| bool | single () const noexcept |
| True if local-only content (ie, nProcs == 1). Such content is often created with gatherNone. | |
| label | nProcs () const noexcept |
| The number of processors covered by the offsets, same as the primary length(). | |
| labelRange | allProcs () const noexcept |
| Range of process indices for all addressed offsets (processes). | |
| labelRange | subProcs () const noexcept |
| Range of process indices for addressed sub-offsets (processes). | |
| label | begin_value () const noexcept |
| The value corresponding to the first offset. | |
| label | end_value () const noexcept |
| The value corresponding to the last offset (end offset), which is 1 beyond the end of the range. | |
| labelRange | front () const |
| The first offset range. It is (0,0) if globalIndex is empty. | |
| labelRange | back () const |
| The last offset range. It is (0,0) if globalIndex is empty. | |
| void | clear () |
| Reset to be empty (no offsets). | |
| void | resize (const label n) |
| Change the number of entries (nProcs) in the offsets table. Extending will fill with empty local sizes. | |
| void | reset (label localSize, const label comm=UPstream::worldComm, const bool parallel=UPstream::parRun()) |
| Reset from local size, using gather/broadcast with default/specified communicator if parallel. | |
| void | reset (const labelUList &counts, const bool checkOverflow=false) |
| Reset offsets from a list of local sizes, with optional check for label overflow. No communication required. | |
| void | reset (globalIndex::gatherNone, label localSize, int communicator=-1) |
| Reset to a single (local size) entry, no communication. | |
| void | reset (globalIndex::gatherOnly, label localSize, const label comm=UPstream::worldComm) |
| Reset as 'one-sided' from local sizes. Uses UPstream::listGatherValues, but no broadcast. Will be empty on non-master processes. | |
| void | reset (globalIndex::gatherNonLocal, label localSize, const label comm=UPstream::worldComm) |
| Reset as 'one-sided' from the non-master local sizes (ie, master size is treated as 0). Uses UPstream::listGatherValues, but no broadcast. Will be empty on non-master processes. | |
| void | reset (const globalIndex &gi) |
| Reset the globalIndex. Same as copy assignment. | |
| void | setLocalSize (const label proci, const label len) |
| Alter local size for given processor. | |
| bool | contains (const label i) const noexcept |
| True if contained within the offsets range. | |
| label | localStart (const label proci) const |
| Start of proci data. | |
| label | localEnd (const label proci) const |
| End of proci data. | |
| label | localSize (const label proci) const |
| Size of proci data. | |
| label | maxNonLocalSize (const label proci) const |
| The max of localSizes, excluding the specified processor. | |
| labelRange | range (label proci) const noexcept |
| Return start/size range of proci data. | |
| OffsetRange< label > | slice (label proci) const noexcept |
| Return start/size/total slab addressing for proci data. | |
| bool | isLocal (const label proci, const label i) const |
| Is on processor proci. | |
| label | toGlobal (const label proci, const label i) const |
| From local to global on proci. | |
| labelList | toGlobal (const label proci, const labelUList &labels) const |
| From local to global on proci. | |
| void | inplaceToGlobal (const label proci, labelUList &labels) const |
| From local to global index on proci (inplace). | |
| label | toLocal (const label proci, const label i) const |
| From global to local on proci. | |
| label | findProc (const label proci, const label i) const |
| Find processor with specified global id. Check proci first, followed by binary search. | |
| label | findProcAbove (const label proci, const label i) const |
| Find processor above proci with specified global id - binary search. | |
| label | findProcBelow (const label proci, const label i) const |
| Find processor below proci with specified global id - binary search. | |
| label | whichProcID (const label proci, const label i) const |
| Which processor does global id come from? Checks proci first (assumed to occur reasonably frequently) followed by a binary search. Fatal for out-of-range indices. | |
| label | localStart () const |
| Local start on myProcNo(). | |
| label | localEnd () const |
| Local end on myProcNo(). | |
| label | localSize () const |
| Local size on myProcNo(). | |
| label | maxNonLocalSize () const |
| The max of localSizes, excluding current (myProcNo) rank. | |
| labelRange | range () const |
| Return start/size range of local (myProcNo) data. | |
| OffsetRange< label > | slice () const |
| Return start/size/total slab addressing for local (myProcNo) data. | |
| bool | isLocal (const label i) const |
| Is on local processor. | |
| label | toGlobal (const label i) const |
| From local to global index. | |
| labelList | toGlobal (const labelUList &labels) const |
| From local to global index. | |
| void | inplaceToGlobal (labelUList &labels) const |
| From local to global index (inplace). | |
| label | toLocal (const label i) const |
| From global to local on current processor. | |
| label | whichProcID (const label i) const |
| Which processor does global id come from? | |
| const_iterator | cbegin () const noexcept |
| A const_iterator set to the beginning. | |
| const const_iterator | cend () const noexcept |
| A const_iterator set to beyond the end. | |
| const_iterator | begin () const noexcept |
| A const_iterator set to the beginning. | |
| const const_iterator | end () const noexcept |
| A const_iterator set to beyond the end. | |
| const_iterator | cbegin (const label proci) const noexcept |
| Return const_iterator at offset proci from begin, clamped to [0,nProcs] range. | |
| const_iterator | begin (const label proci) const noexcept |
| Return const_iterator at offset proci from begin, clamped to [0,nProcs] range. | |
| bool | splitNodeOffsets (labelList &interNodeOffsets, labelList &localNodeOffsets, const label communicator=UPstream::worldComm, const bool absoluteLocalNodeOffsets=false) const |
| Split the top-level offsets into inter-node and local-node components suitable to a two-stage hierarchy. | |
| template<class ProcIDsContainer, class Type> | |
| void | gather (const label comm, const ProcIDsContainer &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking) const |
| Collect data in processor order on master (== procIDs[0]). | |
| template<class ProcIDsContainer, class Type> | |
| void | gatherInplace (const label comm, const ProcIDsContainer &procIDs, List< Type > &fld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking) const |
| Inplace collect in processor order on master (== procIDs[0]). | |
| template<class Type> | |
| void | gather (const UList< Type > &sendData, List< Type > &allData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) const |
| Collect data in processor order on master (in serial: performs a simple copy). | |
| template<class Type, class Addr> | |
| void | gather (const IndirectListBase< Type, Addr > &sendData, List< Type > &allData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) const |
| Collect data indirectly in processor order on master (in serial: performs a simple copy). | |
| template<class Type, class OutputContainer = List<Type>> | |
| OutputContainer | gather (const UList< Type > &sendData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) const |
| Collect data in processor order on master (in serial: performs a simple copy). | |
| template<class Type, class Addr, class OutputContainer = List<Type>> | |
| OutputContainer | gather (const IndirectListBase< Type, Addr > &sendData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) const |
| Collect data indirectly in processor order on master. | |
| template<class Type> | |
| void | gatherInplace (List< Type > &fld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) const |
| Inplace collect data in processor order on master (in serial: a no-op). | |
| template<class Type, class OutputContainer = List<Type>> | |
| void | mpiGather (const UList< Type > &sendData, OutputContainer &allData, const label comm=UPstream::worldComm, UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const int tag=UPstream::msgType()) const |
| Use MPI_Gatherv call for contiguous data when possible (in serial: performs a simple copy). | |
| template<class Type, class OutputContainer = List<Type>> | |
| OutputContainer | mpiGather (const UList< Type > &sendData, const label comm=UPstream::worldComm, UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const int tag=UPstream::msgType()) const |
| Use MPI_Gatherv call for contiguous data when possible (in serial: performs a simple copy). | |
| template<class Type> | |
| void | mpiGatherInplace (List< Type > &fld, const label comm=UPstream::worldComm, UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const int tag=UPstream::msgType()) const |
| Use MPI_Gatherv call to inplace collect contiguous data when possible. (in serial: a no-op). | |
| template<class ProcIDsContainer, class Type> | |
| void | scatter (const label comm, const ProcIDsContainer &procIDs, const UList< Type > &allFld, UList< Type > &fld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking) const |
| Distribute data in processor order. | |
| template<class Type> | |
| void | scatter (const UList< Type > &allData, UList< Type > &localData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) const |
| Distribute data in processor order. | |
| template<class Type, class OutputContainer = List<Type>> | |
| OutputContainer | scatter (const UList< Type > &allData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) const |
| Distribute data in processor order (in serial: performs a simple copy). | |
| template<class Type, class CombineOp> | |
| void | get (List< Type > &allFld, const labelUList &globalIds, const CombineOp &cop, const label comm=UPstream::worldComm, const int tag=UPstream::msgType()) const |
| Get (potentially remote) data. Elements required given as global indices. | |
| bool | operator== (const globalIndex &rhs) const |
| Compare for equality - uses the offsets. | |
| bool | operator!= (const globalIndex &rhs) const |
| Compare for inequality - uses the offsets. | |
| bool | operator< (const globalIndex &rhs) const |
| Compare for less-than - uses the offsets. | |
| globalIndex (label localSize, const int tag, const label comm, const bool parallel) | |
| Construct from local size, using gather/broadcast with default/specified communicator if parallel. | |
| void | reset (label localSize, const int tag, const label comm, const bool parallel) |
| Reset from local size, using gather/broadcast with default/specified communicator if parallel. | |
| label | offset (const label proci) const |
| Prefer localStart() to avoid confusing with offsets(). | |
Static Public Member Functions | |
| static const globalIndex & | null () noexcept |
| Return a null globalIndex (reference to a nullObject). Behaves like an empty globalIndex. | |
| template<class IntType> | |
| static IntType | calcOffset (IntType localSize, const label comm=UPstream::worldComm) |
| Based on the local input size(s), calculate a globally-consistent local start offset. | |
| template<class IntType> | |
| static IntType | calcOffset (IntType localSize, const label comm, const bool checkOverflow) |
| Based on the local input size(s), calculate a globally-consistent local start offset. | |
| template<class IntType> | |
| static std::enable_if_t< std::is_integral_v< IntType >, IntRange< IntType > > | calcRange (IntType localSize, const label comm=UPstream::worldComm) |
| Based on the local input size(s), calculate a globally-consistent range (offset/size). | |
| template<class IntType> | |
| static std::enable_if_t< std::is_integral_v< IntType >, IntRange< IntType > > | calcRange (IntType localSize, const label comm, const bool checkOverflow) |
| Based on the local input size(s), calculate a globally-consistent range (offset/size). With optional overflow checking. | |
| template<class IntType> | |
| static List< IntType > | calcRecvSizes (IntType localSize, const label comm=UPstream::worldComm) |
| Get the receive sizes. On master the length == nProcs and element [0] corresponds to the max of all other receive sizes. On non-master, the list is zero-sized. | |
| static labelList | calcOffsets (const labelUList &counts, const bool checkOverflow=false) |
| Calculate offsets from a list of local sizes, with optional check for label overflow. | |
| template<class Addr> | |
| static labelList | calcOffsets (const IndirectListBase< label, Addr > &counts, const bool checkOverflow=false) |
| Calculate offsets from an indirect list of local sizes, with optional check for label overflow. | |
| template<class SubListType> | |
| static labelList | calcListOffsets (const List< SubListType > &lists, const bool checkOverflow=false) |
| Calculate offsets from list of lists, with optional check for label overflow. | |
| static List< labelRange > | calcRanges (const labelUList &counts, const bool checkOverflow=false) |
| Calculate ranges (offset/size) from a list of local sizes, with optional check for label overflow. | |
| template<class ProcIDsContainer, class Type> | |
| static List< Type > | listGatherValues (const label comm, const ProcIDsContainer &procIDs, const Type &localValue, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking) |
| Collect single values in processor order on master (== procIDs[0]). | |
| template<class ProcIDsContainer, class Type> | |
| static void | gather (const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &fld, UList< Type > &allFld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking) |
| Collect data in processor order on master (== procIDs[0]). | |
| template<class ProcIDsContainer, class Type, class Addr> | |
| static void | gather (const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const IndirectListBase< Type, Addr > &fld, UList< Type > &allFld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking) |
| Collect indirect data in processor order on master. | |
| template<class ProcIDsContainer, class Type> | |
| static void | gatherInplace (const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, List< Type > &fld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking) |
| Inplace collect in processor order on master (== procIDs[0]). | |
| template<class Type, class OutputContainer = List<Type>> | |
| static void | mpiGatherOp (const UList< Type > &sendData, OutputContainer &allData, const label comm=UPstream::worldComm, UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const int tag=UPstream::msgType()) |
| Use MPI_Gatherv call to collect contiguous data when possible (in serial: performs a simple copy). | |
| template<class Type, class OutputContainer = List<Type>> | |
| static OutputContainer | mpiGatherOp (const UList< Type > &sendData, const label comm=UPstream::worldComm, UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const int tag=UPstream::msgType()) |
| Use MPI_Gatherv call to collect contiguous data when possible (in serial: performs a simple copy). | |
| template<class Type> | |
| static void | mpiGatherInplaceOp (List< Type > &fld, const label comm=UPstream::worldComm, UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const int tag=UPstream::msgType()) |
| Use MPI_Gatherv call to inplace collect contiguous data when possible. (in serial: a no-op). | |
| template<class Type> | |
| static void | gatherOp (const UList< Type > &sendData, List< Type > &allData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) |
| Collect data in processor order on master (in serial: performs a simple copy). | |
| template<class Type, class Addr> | |
| static void | gatherOp (const IndirectListBase< Type, Addr > &sendData, List< Type > &allData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) |
| Collect data in processor order on master (in serial: performs a simple copy). | |
| template<class Type, class OutputContainer = List<Type>> | |
| static OutputContainer | gatherOp (const UList< Type > &sendData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) |
| Collect and return data in processor order on master (in serial: performs a simple copy). | |
| template<class Type, class Addr, class OutputContainer = List<Type>> | |
| static OutputContainer | gatherOp (const IndirectListBase< Type, Addr > &sendData, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) |
| Collect and return data in processor order on master (in serial: performs a simple copy). | |
| template<class Type> | |
| static void | gatherInplaceOp (List< Type > &fld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking, const label comm=UPstream::worldComm) |
| Inplace collect data in processor order on master (in serial: a no-op). | |
| template<class ProcIDsContainer, class Type> | |
| static void | scatter (const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &allFld, UList< Type > &fld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking) |
| Distribute data in processor order. | |
Friends | |
| Istream & | operator>> (Istream &is, globalIndex &gi) |
| Ostream & | operator<< (Ostream &os, const globalIndex &gi) |
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from different MPI ranks. These offsets can be used to define a unique (global) indexing number.
For example,
globalIndex globalFaces(mesh.nFaces());
label globalFacei = globalFaces.toGlobal(facei);
Definition at line 76 of file globalIndex.H.
| typedef label value_type |
Type of values contained.
Definition at line 138 of file globalIndex.H.
| typedef label size_type |
The type that can represent the size.
Definition at line 143 of file globalIndex.H.
|
defaultnoexcept |
Default construct (empty).
References globalIndex(), localSize(), localSizes(), and Foam::noexcept.
Referenced by globalIndex::const_iterator::const_iterator(), globalIndex(), globalIndex(), globalIndex(), null(), operator!=(), operator<(), operator<<, operator==(), operator>>, reset(), and reset().


|
inlineexplicit |
Copy construct from a list of offsets. No communication required.
Definition at line 85 of file globalIndexI.H.
References UList< T >::size().

|
inlineexplicit |
Move construct from a list of offsets. No communication required.
Definition at line 97 of file globalIndexI.H.
|
inline |
Construct from a list of sizes and calculate the offsets. No communication required.
Definition at line 111 of file globalIndexI.H.
References localSizes(), and reset().

|
inlineexplicit |
Construct from local size, using gather/broadcast with default/specified communicator if parallel.
| comm | communicator |
| parallel | use parallel comms |
Definition at line 121 of file globalIndexI.H.
References localSize(), and reset().

|
inline |
Construct with a single (local size) entry, no communication.
| communicator | (unused) no communicator needed |
Definition at line 132 of file globalIndexI.H.
References localSize().

|
inline |
Construct 'one-sided' from local sizes. Uses UPstream::listGatherValues, but no broadcast. Will be empty on non-master processes.
| comm | communicator |
Definition at line 146 of file globalIndexI.H.
References UPstream::listGatherValues(), localSize(), and reset().

|
inline |
Construct 'one-sided' from the non-master local sizes (ie, master size is treated as 0). Uses UPstream::listGatherValues, but no broadcast. Will be empty on non-master processes.
| comm | communicator |
Definition at line 158 of file globalIndexI.H.
References UPstream::listGatherValues(), localSize(), UPstream::master(), and reset().

|
explicit |
Construct from Istream. No communication required.
References empty(), FOAM_DEPRECATED_STRICT, globalIndex(), length(), and Foam::noexcept.

|
inline |
Construct from local size, using gather/broadcast with default/specified communicator if parallel.
Definition at line 1463 of file globalIndex.H.
References globalIndex(), localSize(), and reset().

|
inlinestaticnoexcept |
Return a null globalIndex (reference to a nullObject). Behaves like an empty globalIndex.
Definition at line 175 of file globalIndex.H.
References globalIndex(), Foam::noexcept, and Foam::NullObjectRef().

|
inlinenoexcept |
Check for default constructed or total-size == 0.
Definition at line 173 of file globalIndexI.H.
References Foam::noexcept.
Referenced by globalIndex().

|
inlinenoexcept |
The number of items covered by the offsets.
Definition at line 186 of file globalIndexI.H.
References Foam::noexcept.
Referenced by cbegin(), cend(), end(), globalIndex(), and nProcs().

|
inlinenoexcept |
Global sum of localSizes. Same as totalSize().
Definition at line 285 of file globalIndex.H.
References Foam::noexcept, size(), and totalSize().
Referenced by size().


|
inlinenoexcept |
The span size covered by the offsets, zero if empty.
Definition at line 193 of file globalIndexI.H.
References begin_value(), end_value(), and Foam::noexcept.

|
inlinenoexcept |
The total addressed size, which corresponds to the end offset and also the sum of all localSizes.
Definition at line 218 of file globalIndexI.H.
References end_value(), and Foam::noexcept.
Referenced by nearWallFields::calcAddressing(), cyclicAMIGAMGInterface::cyclicAMIGAMGInterface(), cyclicAMIGAMGInterface::cyclicAMIGAMGInterface(), metisLikeDecomp::decomposeGeneral(), distributedTriSurfaceMesh::globalSize(), regionSplit::nRegions(), SprayCloud< CloudType >::penetration(), size(), and streamLineBase::writeToFile().


|
inline |
The local sizes. Same as localSizes().
Definition at line 224 of file globalIndexI.H.
References localSizes().

|
inline |
The local starts.
Definition at line 270 of file globalIndexI.H.
References UList< label >::null().

| labelList localSizes | ( | ) | const |
The local sizes.
References localSizes().
Referenced by globalIndex(), globalIndex(), localSizes(), and sizes().


| List< labelRange > ranges | ( | ) | const |
Return start/size ranges for all data.
References allProcs(), begin_value(), end_value(), maxSize(), Foam::noexcept, nProcs(), offsets(), ranges(), single(), and subProcs().
Referenced by ranges().


|
inline |
Global max of localSizes.
Definition at line 319 of file globalIndexI.H.
References maxNonLocalSize().
Referenced by ranges().


|
inlinenoexcept |
Const-access to the offsets.
Definition at line 252 of file globalIndexI.H.
References Foam::noexcept.
Referenced by surfaceNoise::calculate(), gather(), gather(), gatherInplace(), operator<(), operator==(), ranges(), and scatter().

|
inlinenoexcept |
Write-access to the offsets, for changing after construction.
Definition at line 258 of file globalIndexI.H.
References Foam::noexcept.
|
inlinenoexcept |
True if local-only content (ie, nProcs == 1). Such content is often created with gatherNone.
Definition at line 180 of file globalIndexI.H.
References Foam::noexcept.
Referenced by ranges().

|
inlinenoexcept |
The number of processors covered by the offsets, same as the primary length().
Definition at line 230 of file globalIndexI.H.
References length(), and Foam::noexcept.
Referenced by ranges().


|
inlinenoexcept |
Range of process indices for all addressed offsets (processes).
Definition at line 236 of file globalIndexI.H.
References Foam::noexcept.
Referenced by ranges().

|
inlinenoexcept |
Range of process indices for addressed sub-offsets (processes).
Definition at line 244 of file globalIndexI.H.
References Foam::noexcept.
Referenced by ZoneMesh< ZoneType, MeshType >::checkParallelSync(), metisLikeDecomp::decomposeGeneral(), PatchTools::gatherAndMerge(), and ranges().

|
inlinenoexcept |
The value corresponding to the first offset.
Definition at line 199 of file globalIndexI.H.
References Foam::noexcept.
Referenced by contains(), ranges(), and span().

|
inlinenoexcept |
The value corresponding to the last offset (end offset), which is 1 beyond the end of the range.
Definition at line 205 of file globalIndexI.H.
References Foam::noexcept.
Referenced by contains(), ranges(), span(), and totalSize().

| labelRange front | ( | ) | const |
The first offset range. It is (0,0) if globalIndex is empty.
References front().
Referenced by front().


| labelRange back | ( | ) | const |
The last offset range. It is (0,0) if globalIndex is empty.
References back(), and clear().
Referenced by back().


|
inline |
Reset to be empty (no offsets).
Definition at line 264 of file globalIndexI.H.
Referenced by back().

| void resize | ( | const label | n | ) |
| void reset | ( | label | localSize, |
| const label | comm = UPstream::worldComm, | ||
| const bool | parallel = UPstream::parRun() ) |
Reset from local size, using gather/broadcast with default/specified communicator if parallel.
| comm | communicator |
| parallel | use parallel comms |
References localSize(), and reset().
Referenced by snappyLayerDriver::addLayers(), surfaceNoise::calculate(), PatchTools::gatherAndMerge(), globalIndex(), reset(), reset(), and reset().


| void reset | ( | const labelUList & | counts, |
| const bool | checkOverflow = false ) |
Reset offsets from a list of local sizes, with optional check for label overflow. No communication required.
References globalIndex(), localSize(), and reset().

|
inline |
Reset to a single (local size) entry, no communication.
| communicator | (unused) no communicator needed |
Definition at line 573 of file globalIndexI.H.
References localSize().

|
inline |
Reset as 'one-sided' from local sizes. Uses UPstream::listGatherValues, but no broadcast. Will be empty on non-master processes.
| comm | communicator |
Definition at line 586 of file globalIndexI.H.
References UPstream::listGatherValues(), localSize(), and reset().

|
inline |
Reset as 'one-sided' from the non-master local sizes (ie, master size is treated as 0). Uses UPstream::listGatherValues, but no broadcast. Will be empty on non-master processes.
| comm | communicator |
Definition at line 598 of file globalIndexI.H.
References UPstream::listGatherValues(), localSize(), UPstream::master(), and reset().

|
inline |
Reset the globalIndex. Same as copy assignment.
Definition at line 611 of file globalIndexI.H.
References globalIndex(), and Foam::rhs().

| void setLocalSize | ( | const label | proci, |
| const label | len ) |
Alter local size for given processor.
References contains(), localEnd(), localSize(), localStart(), Foam::noexcept, and setLocalSize().
Referenced by setLocalSize().


|
inlinenoexcept |
True if contained within the offsets range.
Definition at line 212 of file globalIndexI.H.
References begin_value(), and end_value().
Referenced by setLocalSize().


|
inline |
Start of proci data.
Definition at line 283 of file globalIndexI.H.
Referenced by Foam::calcCellCellsImpl(), viewFactor::calculate(), lduPrimitiveMesh::globalCellCells(), localStart(), maxNonLocalSize(), and setLocalSize().

|
inline |
End of proci data.
Definition at line 295 of file globalIndexI.H.
Referenced by localEnd(), maxNonLocalSize(), and setLocalSize().

|
inline |
Size of proci data.
Definition at line 307 of file globalIndexI.H.
Referenced by holeToFace::calcClosure(), calcOffset(), calcOffset(), createShellMesh::calcPointRegions(), calcRange(), calcRange(), calcRecvSizes(), viewFactor::calculate(), metisLikeDecomp::decomposeGeneral(), globalIndex(), globalIndex(), globalIndex(), globalIndex(), globalIndex(), globalIndex(), localSize(), maxNonLocalSize(), regionSplit::nLocalRegions(), surfaceNoise::readSurfaceData(), reset(), reset(), reset(), reset(), reset(), reset(), setLocalSize(), and streamLineBase::writeToFile().

| label maxNonLocalSize | ( | const label | proci | ) | const |
The max of localSizes, excluding the specified processor.
References findProc(), findProcAbove(), findProcBelow(), inplaceToGlobal(), isLocal(), localEnd(), localSize(), localStart(), maxNonLocalSize(), Foam::noexcept, range(), slice(), toGlobal(), toLocal(), and whichProcID().
Referenced by maxNonLocalSize(), maxNonLocalSize(), and maxSize().


|
inlinenoexcept |
Return start/size range of proci data.
Definition at line 332 of file globalIndexI.H.
Referenced by ZoneMesh< ZoneType, MeshType >::checkParallelSync(), metisLikeDecomp::decomposeGeneral(), PatchTools::gatherAndMerge(), meshRefinement::getMasterEdges(), cellCellStencil::globalCellCells(), GAMGProcAgglomeration::globalCellCells(), maxNonLocalSize(), and surfaceNoise::readSurfaceData().

|
inlinenoexcept |
Return start/size/total slab addressing for proci data.
Definition at line 345 of file globalIndexI.H.
Referenced by findProc(), findProcBelow(), and maxNonLocalSize().

|
inline |
Is on processor proci.
Definition at line 358 of file globalIndexI.H.
Referenced by Foam::calcCellCellsImpl(), mapDistributeBase::calcCompactAddressing(), mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcExtrudeInfo(), refinementParameters::findCells(), findProc(), fluxSummary::initialiseCellZoneAndDirection(), isLocal(), mapDistribute::mapDistributeBase(), maxNonLocalSize(), regionSplit2D::regionSplit2D(), and mapDistributeBase::renumber().

|
inline |
From local to global on proci.
Definition at line 371 of file globalIndexI.H.
Referenced by MGridGenGAMGAgglomeration::agglomerate(), nearWallFields::calcAddressing(), Foam::calcCellCellsImpl(), holeToFace::calcClosure(), createShellMesh::calcPointRegions(), viewFactor::calculate(), cyclicAMIGAMGInterface::cyclicAMIGAMGInterface(), cyclicAMIGAMGInterface::cyclicAMIGAMGInterface(), refinementParameters::findCells(), meshRefinement::getMasterEdges(), cellCellStencil::globalCellCells(), addPatchCellLayer::globalEdgeFaces(), inverseDistance::holeExtrapolationStencil(), viewFactor::initialise(), fluxSummary::initialiseCellZoneAndDirection(), viewFactor::insertMatrixElements(), inverseDistance::markDonors(), maxNonLocalSize(), globalMeshData::mergePoints(), globalMeshData::mergePoints(), regionSplit2D::regionSplit2D(), structuredRenumber::renumber(), faMeshBoundaryHalo::reset(), addPatchCellLayer::setRefinement(), toGlobal(), toGlobal(), cellVolumeWeight::update(), and oversetFvMeshBase::updateAddressing().

|
inline |
From local to global on proci.
Definition at line 387 of file globalIndexI.H.
References inplaceToGlobal().

|
inline |
From local to global index on proci (inplace).
Definition at line 414 of file globalIndexI.H.
Referenced by faceAreaWeightAMI2D::calculate(), faceAreaWeightAMI::calculate(), metisLikeDecomp::decomposeGeneral(), PatchTools::gatherAndMerge(), inverseDistance::holeExtrapolationStencil(), inplaceToGlobal(), maxNonLocalSize(), cyclicAMIPolyPatch::setAMIFaces(), and toGlobal().

|
inline |
From global to local on proci.
Definition at line 437 of file globalIndexI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by fvMeshPrimitiveLduAddressing::addAddressing(), Foam::calcCellCellsImpl(), mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcExtrudeInfo(), viewFactor::calculate(), refinementParameters::findCells(), viewFactor::initialise(), fluxSummary::initialiseCellZoneAndDirection(), distributedTriSurfaceMesh::localQueries(), maxNonLocalSize(), mapDistributeBase::renumber(), toLocal(), and oversetFvMeshBase::updateAddressing().


|
inline |
Find processor with specified global id. Check proci first, followed by binary search.
Definition at line 458 of file globalIndexI.H.
References Foam::findLower(), isLocal(), and slice().
Referenced by maxNonLocalSize(), and whichProcID().


|
inline |
Find processor above proci with specified global id - binary search.
Definition at line 497 of file globalIndexI.H.
References Foam::findLower().
Referenced by maxNonLocalSize().


|
inline |
Find processor below proci with specified global id - binary search.
Binary search.
Definition at line 520 of file globalIndexI.H.
References Foam::findLower(), and slice().
Referenced by maxNonLocalSize().


|
inline |
Which processor does global id come from? Checks proci first (assumed to occur reasonably frequently) followed by a binary search. Fatal for out-of-range indices.
Definition at line 544 of file globalIndexI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, findProc(), and Foam::nl.
Referenced by fvMeshPrimitiveLduAddressing::addAddressing(), mapDistributeBase::calcCompactAddressing(), mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcExtrudeInfo(), viewFactor::calculate(), refinementParameters::findCells(), distributedTriSurfaceMesh::findNearest(), viewFactor::initialise(), distributedTriSurfaceMesh::localQueries(), mapDistribute::mapDistributeBase(), maxNonLocalSize(), mapDistributeBase::renumber(), oversetFvMeshBase::updateAddressing(), and whichProcID().


|
inline |
Local start on myProcNo().
Definition at line 289 of file globalIndexI.H.
References localStart(), UPstream::myProcNo(), and UPstream::worldComm.
Referenced by offset().


|
inline |
Local end on myProcNo().
Definition at line 301 of file globalIndexI.H.
References localEnd(), UPstream::myProcNo(), and UPstream::worldComm.

|
inline |
Local size on myProcNo().
Definition at line 313 of file globalIndexI.H.
References localSize(), UPstream::myProcNo(), and UPstream::worldComm.

|
inline |
The max of localSizes, excluding current (myProcNo) rank.
Definition at line 326 of file globalIndexI.H.
References maxNonLocalSize(), UPstream::myProcNo(), and UPstream::worldComm.

|
inline |
Return start/size range of local (myProcNo) data.
Definition at line 338 of file globalIndexI.H.
References UPstream::myProcNo(), and UPstream::worldComm.

|
inline |
Return start/size/total slab addressing for local (myProcNo) data.
Definition at line 352 of file globalIndexI.H.
References UPstream::myProcNo(), and UPstream::worldComm.

|
inline |
Is on local processor.
Definition at line 365 of file globalIndexI.H.
References isLocal(), UPstream::myProcNo(), and UPstream::worldComm.

|
inline |
From local to global index.
Definition at line 381 of file globalIndexI.H.
References UPstream::myProcNo(), toGlobal(), and UPstream::worldComm.

|
inline |
From local to global index.
Definition at line 405 of file globalIndexI.H.
References UPstream::myProcNo(), toGlobal(), and UPstream::worldComm.

|
inline |
From local to global index (inplace).
Definition at line 430 of file globalIndexI.H.
References inplaceToGlobal(), UPstream::myProcNo(), and UPstream::worldComm.

|
inline |
From global to local on current processor.
FatalError if not on local processor.
Definition at line 452 of file globalIndexI.H.
References UPstream::myProcNo(), toLocal(), and UPstream::worldComm.

|
inline |
Which processor does global id come from?
Uses myProcNo for the initial local check.
Definition at line 564 of file globalIndexI.H.
References UPstream::myProcNo(), whichProcID(), and UPstream::worldComm.

|
inlinenoexcept |
A const_iterator set to the beginning.
Definition at line 733 of file globalIndexI.H.
References Foam::noexcept.
Referenced by begin().

|
inlinenoexcept |
A const_iterator set to beyond the end.
Definition at line 740 of file globalIndexI.H.
References length(), and Foam::noexcept.

|
inlinenoexcept |
A const_iterator set to the beginning.
Definition at line 747 of file globalIndexI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_iterator set to beyond the end.
Definition at line 754 of file globalIndexI.H.
References length(), and Foam::noexcept.

|
inlinenoexcept |
Return const_iterator at offset proci from begin, clamped to [0,nProcs] range.
Definition at line 761 of file globalIndexI.H.
References length().

|
inlinenoexcept |
Return const_iterator at offset proci from begin, clamped to [0,nProcs] range.
Definition at line 769 of file globalIndexI.H.
References cbegin().

|
static |
Based on the local input size(s), calculate a globally-consistent local start offset.
No overflow checks.
| comm | communicator |
References calcOffset(), and localSize().
Referenced by calcOffset(), calcOffset(), calcRange(), calcRange(), regionSplit2D::regionSplit2D(), and topOVariablesBase::writeFluidSolidInterface().


|
inlinestatic |
Based on the local input size(s), calculate a globally-consistent local start offset.
With optional overflow checking.
| comm | communicator |
Definition at line 779 of file globalIndex.H.
References calcOffset(), UPstream::is_parallel(), localSize(), and UPstream::myProcNo().

|
inlinestatic |
Based on the local input size(s), calculate a globally-consistent range (offset/size).
No overflow checks.
| comm | communicator |
Definition at line 810 of file globalIndex.H.
References calcOffset(), localSize(), and UPstream::worldComm.

|
inlinestatic |
Based on the local input size(s), calculate a globally-consistent range (offset/size). With optional overflow checking.
| comm | communicator |
Definition at line 829 of file globalIndex.H.
References calcOffset(), and localSize().

|
static |
Get the receive sizes. On master the length == nProcs and element [0] corresponds to the max of all other receive sizes. On non-master, the list is zero-sized.
| comm | communicator |
References localSize(), and UPstream::worldComm.

|
static |
Calculate offsets from a list of local sizes, with optional check for label overflow.
|
static |
Calculate offsets from an indirect list of local sizes, with optional check for label overflow.
|
static |
Calculate offsets from list of lists, with optional check for label overflow.
|
static |
Calculate ranges (offset/size) from a list of local sizes, with optional check for label overflow.
| bool splitNodeOffsets | ( | labelList & | interNodeOffsets, |
| labelList & | localNodeOffsets, | ||
| const label | communicator = UPstream::worldComm, | ||
| const bool | absoluteLocalNodeOffsets = false ) const |
Split the top-level offsets into inter-node and local-node components suitable to a two-stage hierarchy.
| [out] | interNodeOffsets | Offsets between nodes (only non-empty on node leaders) |
| [out] | localNodeOffsets | Offsets within a node (only non-empty on node leaders) |
| communicator | The communicator. Must resolve to const world-comm | |
| absoluteLocalNodeOffsets | Retain absolute values for the localNode offsets |
References UPstream::worldComm.
|
staticnodiscard |
Collect single values in processor order on master (== procIDs[0]).
Handles contiguous/non-contiguous data. non-zero output field (master only)
| comm | communicator |
References UPstream::msgType(), and UPstream::nonBlocking.
Referenced by GAMGAgglomeration::procAgglomerateRestrictAddressing().


|
static |
Collect data in processor order on master (== procIDs[0]).
Handles contiguous/non-contiguous data, skips empty fields.
| offsets | offsets (master only) | |
| comm | communicator | |
| [in] | fld | all ranks |
| [out] | allFld | result (master only). Must be adequately sized! |
References fld(), UPstream::msgType(), UPstream::nonBlocking, and offsets().
Referenced by ZoneMesh< ZoneType, MeshType >::checkParallelSync(), simpleGeomDecomp::decompose(), metisLikeDecomp::decomposeGeneral(), PatchTools::gatherAndMerge(), surfaceWriter::mergeFieldTemplate(), GAMGAgglomeration::procAgglomerateRestrictAddressing(), surfaceNoise::surfaceAverage(), and surfaceNoise::writeSurfaceData().


|
static |
Collect indirect data in processor order on master.
Handles contiguous/non-contiguous data, skips empty fields.
| offsets | offsets (master only) | |
| comm | communicator | |
| [in] | fld | all ranks |
| [out] | allFld | result (master only). Must be adequately sized! |
References fld(), UPstream::msgType(), UPstream::nonBlocking, and offsets().

|
static |
Inplace collect in processor order on master (== procIDs[0]).
References fld(), UPstream::msgType(), UPstream::nonBlocking, and offsets().
Referenced by gatherInplace(), SprayCloud< CloudType >::penetration(), and GAMGAgglomeration::restrictField().


| void gather | ( | const label | comm, |
| const ProcIDsContainer & | procIDs, | ||
| const UList< Type > & | fld, | ||
| List< Type > & | allFld, | ||
| const int | tag = UPstream::msgType(), | ||
| UPstream::commsTypes | commsType = UPstream::commsTypes::nonBlocking ) const |
Collect data in processor order on master (== procIDs[0]).
| comm | communicator | |
| [in] | fld | input field |
| [out] | allFld | resized to have results on master, empty elsewhere. |
References fld(), UPstream::msgType(), and UPstream::nonBlocking.

|
inline |
Inplace collect in processor order on master (== procIDs[0]).
| comm | communicator | |
| [in,out] | fld |
Definition at line 1007 of file globalIndex.H.
References fld(), gatherInplace(), UPstream::msgType(), and UPstream::nonBlocking.

| void gather | ( | const UList< Type > & | sendData, |
| List< Type > & | allData, | ||
| const int | tag = UPstream::msgType(), | ||
| UPstream::commsTypes | commsType = UPstream::commsTypes::nonBlocking, | ||
| const label | comm = UPstream::worldComm ) const |
Collect data in processor order on master (in serial: performs a simple copy).
Communication with default/specified communicator, message tag.
| [in] | sendData | input on all ranks |
| [out] | allData | resized to have results on master, empty elsewhere. |
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

| void gather | ( | const IndirectListBase< Type, Addr > & | sendData, |
| List< Type > & | allData, | ||
| const int | tag = UPstream::msgType(), | ||
| UPstream::commsTypes | commsType = UPstream::commsTypes::nonBlocking, | ||
| const label | comm = UPstream::worldComm ) const |
Collect data indirectly in processor order on master (in serial: performs a simple copy).
Communication with default/specified communicator, message tag.
| [in] | sendData | input on all ranks |
| [out] | allData | resized to have results on master, empty elsewhere. |
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
nodiscard |
Collect data in processor order on master (in serial: performs a simple copy).
Communication with default/specified communicator, message tag.
| [in] | sendData | all ranks |
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
nodiscard |
Collect data indirectly in processor order on master.
Communication with default/specified communicator, message tag.
| [in] | sendData | all ranks |
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

| void gatherInplace | ( | List< Type > & | fld, |
| const int | tag = UPstream::msgType(), | ||
| UPstream::commsTypes | commsType = UPstream::commsTypes::nonBlocking, | ||
| const label | comm = UPstream::worldComm ) const |
Inplace collect data in processor order on master (in serial: a no-op).
Communication with default/specified communicator, message tag. After the gather, the field is zero-sized on non-master.
| [in,out] | fld | |
| comm | communicator |
References fld(), UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

| void mpiGather | ( | const UList< Type > & | sendData, |
| OutputContainer & | allData, | ||
| const label | comm = UPstream::worldComm, | ||
| UPstream::commsTypes | commsType = UPstream::commsTypes::nonBlocking, | ||
| const int | tag = UPstream::msgType() ) const |
Use MPI_Gatherv call for contiguous data when possible (in serial: performs a simple copy).
Communication with default/specified communicator.
| [out] | allData | output on master, zero-sized on non-master |
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.
Referenced by surfaceWriter::mergeFieldTemplate().


|
nodiscard |
Use MPI_Gatherv call for contiguous data when possible (in serial: performs a simple copy).
Communication with default/specified communicator.
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

| void mpiGatherInplace | ( | List< Type > & | fld, |
| const label | comm = UPstream::worldComm, | ||
| UPstream::commsTypes | commsType = UPstream::commsTypes::nonBlocking, | ||
| const int | tag = UPstream::msgType() ) const |
Use MPI_Gatherv call to inplace collect contiguous data when possible. (in serial: a no-op).
Communication with default/specified communicator.
After the gather, the field is zero-sized on non-master.
| [in,out] | fld | |
| comm | communicator |
References fld(), UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
static |
Use MPI_Gatherv call to collect contiguous data when possible (in serial: performs a simple copy).
Communication with default/specified communicator.
The allData is output (master), zero-sized on non-master
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
staticnodiscard |
Use MPI_Gatherv call to collect contiguous data when possible (in serial: performs a simple copy).
Communication with default/specified communicator.
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
static |
Use MPI_Gatherv call to inplace collect contiguous data when possible. (in serial: a no-op).
Communication with default/specified communicator.
After the gather, the field is zero-sized on non-master.
| [in,out] | fld | |
| comm | communicator |
References fld(), UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
static |
Collect data in processor order on master (in serial: performs a simple copy).
Communication with default/specified communicator, message tag.
| [out] | allData | output on master, zero-sized on non-master |
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.
Referenced by coordSet::gatherSort(), and mergedSurf::merge().


|
static |
Collect data in processor order on master (in serial: performs a simple copy).
Communication with default/specified communicator, message tag.
| [out] | allData | output on master, zero-sized on non-master |
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
staticnodiscard |
Collect and return data in processor order on master (in serial: performs a simple copy).
Communication with default/specified communicator, message tag.
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
staticnodiscard |
Collect and return data in processor order on master (in serial: performs a simple copy).
Communication with default/specified communicator, message tag.
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
static |
Inplace collect data in processor order on master (in serial: a no-op).
Communication with default/specified communicator, message tag.
After the gather, the field is zero-sized on non-master.
| [in,out] | fld | |
| comm | communicator |
References fld(), UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
static |
Distribute data in processor order.
Requires fld to be correctly sized! Communication with default/specified communicator, message tag.
| offsets | offsets (master only) |
| comm | communicator |
References fld(), UPstream::msgType(), UPstream::nonBlocking, and offsets().
Referenced by simpleGeomDecomp::decompose(), metisLikeDecomp::decomposeGeneral(), GAMGAgglomeration::prolongField(), GAMGAgglomeration::prolongField(), surfaceNoise::readSurfaceData(), and scatter().


|
inline |
Distribute data in processor order.
Requires fld to be correctly sized! Communication with default/specified communicator, message tag.
| comm | communicator |
Definition at line 1356 of file globalIndex.H.
References fld(), UPstream::msgType(), UPstream::nonBlocking, and scatter().

| void scatter | ( | const UList< Type > & | allData, |
| UList< Type > & | localData, | ||
| const int | tag = UPstream::msgType(), | ||
| UPstream::commsTypes | commsType = UPstream::commsTypes::nonBlocking, | ||
| const label | comm = UPstream::worldComm ) const |
Distribute data in processor order.
Requires fld to be correctly sized! Communication with default/specified communicator, message tag.
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

|
nodiscard |
Distribute data in processor order (in serial: performs a simple copy).
Communication with default/specified communicator, message tag.
| comm | communicator |
References UPstream::msgType(), UPstream::nonBlocking, and UPstream::worldComm.

| void get | ( | List< Type > & | allFld, |
| const labelUList & | globalIds, | ||
| const CombineOp & | cop, | ||
| const label | comm = UPstream::worldComm, | ||
| const int | tag = UPstream::msgType() ) const |
Get (potentially remote) data. Elements required given as global indices.
Communication with default/specified communicator, message tag.
| comm | communicator |
References UPstream::msgType(), and UPstream::worldComm.

|
inline |
Compare for equality - uses the offsets.
Definition at line 1428 of file globalIndex.H.
References globalIndex(), offsets(), and Foam::rhs().

|
inline |
Compare for inequality - uses the offsets.
Definition at line 1436 of file globalIndex.H.
References globalIndex(), and Foam::rhs().

|
inline |
Compare for less-than - uses the offsets.
Definition at line 1444 of file globalIndex.H.
References globalIndex(), offsets(), and Foam::rhs().

|
inline |
Reset from local size, using gather/broadcast with default/specified communicator if parallel.
Definition at line 1479 of file globalIndex.H.
References localSize(), and reset().

|
inline |
Prefer localStart() to avoid confusing with offsets().
Definition at line 1494 of file globalIndex.H.
References localStart(), and offset().
Referenced by offset().


|
friend |
References globalIndex().
|
friend |
References globalIndex(), and os().