40 #ifndef Foam_OPstream_H 41 #define Foam_OPstream_H 68 const int bufferSize = 0,
165 template<
class Type,
class... Args>
168 const int communicator,
static void sends(const int communicator, Type &value, Args &&... values)
Serialize multiple items and broadcast the buffer Uses operator<< for serialization.
commsTypes
Communications types.
static int & msgType() noexcept
Message tag of standard messages.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
OPstream(const UPstream::commsTypes commsType, const int toProcNo, const int bufferSize=0, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Construct for given process index to send to.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
OPBstream(const int communicator=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Construct with optional communicator and write format.
"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)
Inter-processor communications stream.
void outputLoop(OS &os, const Type &arg1, Args &&... args)
Output looping. Write first parameter and recurse.
Output inter-processor communications stream using MPI broadcast - operating on external buffer...
commsTypes commsType() const noexcept
Get the communications type of the stream.
Output inter-processor communications stream using MPI send/recv etc. - operating on external buffer...
OBJstream os(runTime.globalPath()/outputName)
Output inter-processor communications stream.
Wrapper for internally indexed communicator label. Always invokes UPstream::allocateCommunicatorCompo...
static void send(const Type &value, const int communicator=UPstream::worldComm)
Serialize a value and broadcast (root == UPstream::masterNo()). Uses operator<< for serialization...
Output inter-processor communications stream using MPI broadcast.
streamFormat
Data format (ascii | binary)
static void send(Foam::zero, const int communicator)
Broadcast a zero value (buffer) size that can be matched by the UIPBstream constructor.
bool send()
Send buffer contents now and not in destructor [advanced usage]. Returns true on success.