55 for (
label i = 1; i < procIDs.
size(); i++)
59 if (contiguous<Type>())
65 reinterpret_cast<char*
>(procSlot.
begin()),
81 fromSlave >> procSlot;
89 if (!contiguous<Type>())
92 <<
"nonBlocking not supported for non-contiguous data"
99 for (
label i = 1; i < procIDs.
size(); i++)
107 reinterpret_cast<char*
>(procSlot.
begin()),
126 if (contiguous<Type>())
132 reinterpret_cast<const char*
>(
fld.begin()),
155 if (!contiguous<Type>())
158 <<
"nonBlocking not supported for non-contiguous data"
169 reinterpret_cast<const char*
>(
fld.begin()),
195 gather(off, comm, procIDs,
fld, allFld, tag, commsType);
199 fld.transfer(allFld);
226 for (
label i = 1; i < procIDs.
size(); i++)
235 if (contiguous<Type>())
241 reinterpret_cast<const char*
>(procSlot.
begin()),
265 if (!contiguous<Type>())
268 <<
"nonBlocking not supported for non-contiguous data"
275 for (
label i = 1; i < procIDs.
size(); i++)
288 reinterpret_cast<const char*
>(procSlot.
begin()),
307 if (contiguous<Type>())
313 reinterpret_cast<char*
>(
fld.begin()),
336 if (!contiguous<Type>())
339 <<
"nonBlocking not supported for non-contiguous data"
350 reinterpret_cast<char*
>(
fld.begin()),
Input inter-processor communications stream.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
Output inter-processor communications stream.
static label read(const commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=0)
Read into given buffer from given processor and return the.
iterator begin()
Return an iterator to begin traversing the UList.
std::streamsize byteSize() const
Return the binary size in number of characters of the UList.
T & last()
Return the last element of the list.
static bool write(const commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=0)
Write given buffer to given processor.
commsTypes
Types of communications.
static label nRequests()
Get number of outstanding requests.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static void gather(const labelUList &offsets, const label comm, const labelList &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]).
static void scatter(const labelUList &offsets, const label comm, const labelList &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!
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.