Go to the documentation of this file.
61 Istream&
operator>>(Istream& is, globalIndex& gi);
62 Ostream&
operator<<(Ostream& os,
const globalIndex& gi);
124 inline bool empty()
const;
130 inline label
size()
const;
168 inline bool isLocal(
const label i)
const;
171 inline label
toGlobal(
const label i)
const;
181 inline label
toLocal(
const label i)
const;
187 inline label
offset(
const label proci)
const;
190 inline label
localStart(
const label proci)
const;
193 inline label
localSize(
const label proci)
const;
199 inline bool isLocal(
const label proci,
const label i)
const;
202 inline label
toGlobal(
const label proci,
const label i)
const;
220 inline label
toLocal(
const label proci,
const label i)
const;
230 template<
class Container,
class Type>
235 const Container& procIDs,
245 template<
class Container,
class Type>
249 const Container& procIDs,
257 gather(offsets_, comm, procIDs,
fld, allFld, tag, commsType);
287 template<
class Container,
class Type>
292 const Container& procIDs,
301 template<
class Container,
class Type>
305 const Container& procIDs,
312 gather(offsets_, comm, procIDs,
fld, tag, commsType);
341 template<
class Container,
class Type>
346 const Container& procIDs,
355 template<
class Container,
class Type>
359 const Container& procIDs,
367 scatter(offsets_, comm, procIDs, allFld,
fld, tag, commsType);
384 template<
class Type,
class CombineOp>
389 const CombineOp& cop,
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.
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)
bool empty() const
Check for null constructed or global sum == 0.
friend Istream & operator>>(Istream &is, globalIndex &gi)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
const labelList & offsets() const
Const-access to the offsets.
A range or interval of labels defined by a start and a size.
static void gatherOp(const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::commsTypes::nonBlocking)
Collect data in processor order on master.
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))
void get(List< Type > &allFld, const labelUList &globalIds, const CombineOp &cop, const label comm=Pstream::worldComm, const int tag=UPstream::msgType()) const
Get (potentially remote) data. Elements required given as.
static void scatter(const labelUList &offsets, const label comm, const Container &procIDs, const UList< Type > &allFld, UList< Type > &fld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::commsTypes::nonBlocking)
Distribute data in processor order. Requires fld to be sized!
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.
label toLocal(const label i) const
From global to local on current processor.
static int & msgType()
Message tag of standard messages.
commsTypes
Types of communications.
label size() const
Global sum of localSizes.
static label worldComm
Default communicator (all processors)
label whichProcID(const label i) const
Which processor does global come from? Binary search.
globalIndex()=default
Construct null.
label offset(const label proci) const
Start of proci data.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label toGlobal(const label i) const
From local to global index.
static void gather(const labelUList &offsets, const label comm, const Container &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::commsTypes::nonBlocking)
Collect data in processor order on master (== procIDs[0]).