Go to the documentation of this file.
61 Istream&
operator>>(Istream& is, globalIndex& gi);
141 inline bool empty()
const;
144 inline label
size()
const;
162 inline label
nProcs() const noexcept;
197 const
bool checkOverflow = false
224 inline
bool isLocal(const label i) const;
227 inline label
toGlobal(const label i) const;
237 inline label
toLocal(const label i) const;
243 inline label
offset(const label proci) const;
246 inline label
localStart(const label proci) const;
249 inline label
localSize(const label proci) const;
258 inline
bool isLocal(const label proci, const label i) const;
261 inline label
toGlobal(const label proci, const label i) const;
279 inline label
toLocal(const label proci, const label i) const;
305 const label proci = 0
312 inline label proci()
const noexcept;
315 inline label start()
const;
318 inline label
size()
const;
357 const
bool checkOverflow = false
362 template<class SubListType>
365 const
List<SubListType>& lists,
366 const
bool checkOverflow = false
374 const
bool checkOverflow = false
384 template<class ProcIDsContainer, class Type>
389 const ProcIDsContainer& procIDs,
392 const
int tag =
UPstream::msgType(),
398 template<class Type, class Addr>
403 const
UList<
int>& procIDs,
406 const
int tag =
UPstream::msgType(),
412 template<class ProcIDsContainer, class Type>
416 const ProcIDsContainer& procIDs,
419 const
int tag =
UPstream::msgType(),
420 const
Pstream::commsTypes commsType =
421 Pstream::commsTypes::nonBlocking
424 gather(offsets_, comm, procIDs,
fld, allFld, tag, commsType);
441 template<
class Type,
class Addr>
453 template<
class ProcIDsContainer,
class Type>
458 const ProcIDsContainer& procIDs,
466 template<
class ProcIDsContainer,
class Type>
470 const ProcIDsContainer& procIDs,
477 gather(offsets_, comm, procIDs,
fld, tag, commsType);
495 template<
class Type,
class OutputContainer = List<Type>>
499 OutputContainer& allValues,
506 template<
class Type,
class OutputContainer = List<Type>>
540 template<
class ProcIDsContainer,
class Type>
545 const ProcIDsContainer& procIDs,
553 template<
class ProcIDsContainer,
class Type>
557 const ProcIDsContainer& procIDs,
565 scatter(offsets_, comm, procIDs, allFld,
fld, tag, commsType);
585 template<
class Type,
class CombineOp>
590 const CombineOp& cop,
static void gather(const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const Pstream::commsTypes=Pstream::commsTypes::nonBlocking)
Collect data in processor order on master (== procIDs[0]).
labelRange allProcs() const noexcept
Range of process indices for all addressed offsets (processes)
label localStart() const
My local start.
labelRange range() const
Return start/size range of local processor data.
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
labelList sizes() const
The local sizes.
static labelList calcListOffsets(const List< SubListType > &lists, const bool checkOverflow=false)
label localSize() const
My local size.
bool isLocal(const label i) const
Is on local processor.
Istream & operator>>(Istream &, directionInfo &)
void inplaceToGlobal(labelList &labels) const
From local to global index (inplace)
void get(List< Type > &allFld, const labelUList &globalIds, const CombineOp &cop, const label comm=UPstream::worldComm, const int tag=UPstream::msgType()) const
bool empty() const
Check for default constructed or global sum == 0.
friend Istream & operator>>(Istream &is, globalIndex &gi)
label maxSize() const
Global max of localSizes.
Forward input iterator with const access.
bool operator!=(const eddy &a, const eddy &b)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Inter-processor communications stream.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
accessType
Disambiguation tag (list construction dispatch)
const const_iterator end() const noexcept
A const_iterator set to beyond the end.
A range or interval of labels defined by a start and a size.
static List< labelRange > calcRanges(const labelUList &localSizes, const bool checkOverflow=false)
friend Ostream & operator<<(Ostream &os, const globalIndex &gi)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
static void gatherOp(const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const Pstream::commsTypes=Pstream::commsTypes::nonBlocking)
Collect data in processor order on master.
OBJstream os(runTime.globalPath()/outputName)
const labelUList localStarts() const
The local starts.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
void reset(const label localSize)
Reset from local size.
labelRange subProcs() const noexcept
Range of process indices for addressed sub-offsets (processes)
const const_iterator cend() const noexcept
A const_iterator set to beyond the end.
commsTypes
Types of communications.
label toLocal(const label i) const
From global to local on current processor.
List< labelRange > ranges() const
Return start/size ranges for all data.
static int & msgType() noexcept
Message tag of standard messages.
void setLocalSize(const label proci, const label len)
Alter local size for given processor.
label size() const
Global sum of localSizes.
void mpiGather(const UList< Type > &sendData, OutputContainer &allValues, const label comm=UPstream::worldComm) const
Collect contiguous data using a MPI_Gatherv call.
label nProcs() const noexcept
The number of processors covered by the offsets.
Inter-processor communications stream.
static label worldComm
Default communicator (all processors)
const labelList & offsets() const noexcept
Const-access to the offsets.
label maxNonLocalSize() const
The max of localSizes, excluding current processor.
label whichProcID(const label i) const
Which processor does global come from? Binary search.
tmp< faMatrix< Type > > operator*(const areaScalarField &, const faMatrix< Type > &)
const_iterator cbegin() const noexcept
A const_iterator set to the beginning.
globalIndex()=default
Default construct.
static void scatter(const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &allFld, UList< Type > &fld, const int tag=UPstream::msgType(), const Pstream::commsTypes=Pstream::commsTypes::nonBlocking)
Distribute data in processor order. Requires fld to be sized!
label offset(const label proci) const
Start of proci data.
const_iterator begin() const noexcept
A const_iterator set to the beginning.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static labelList calcOffsets(const labelUList &localSizes, const bool checkOverflow=false)
label toGlobal(const label i) const
From local to global index.