Output inter-processor communications stream. More...
#include <OpenFOAM/OPstream.H>
Output inter-processor communications stream.
Definition at line 53 of file OPstream.H.
Public Member Functions | |
OPstream (const commsTypes commsType, const int toProcNo, const label bufSize=0, streamFormat format=BINARY, versionNumber version=currentVersion) | |
Construct given process index to send to and optional buffer size,.
| |
~OPstream () | |
ios_base::fmtflags | flags () const |
Return flags of output stream.
| |
Ostream & | write (const token &) |
Write next token to stream.
| |
Ostream & | write (const char) |
Write character.
| |
Ostream & | write (const char *) |
Write character string.
| |
Ostream & | write (const word &) |
Write word.
| |
Ostream & | write (const string &) |
Write string.
| |
Ostream & | writeQuoted (const std::string &, const bool quoted=true) |
Write std::string surrounded by quotes.
| |
Ostream & | write (const label) |
Write label.
| |
Ostream & | write (const floatScalar) |
Write floatScalar.
| |
Ostream & | write (const doubleScalar) |
Write doubleScalar.
| |
Ostream & | write (const char *, std::streamsize) |
Write binary block.
| |
void | indent () |
Add indentation characters.
| |
void | flush () |
Flush stream.
| |
void | endl () |
Add newline and flush stream.
| |
int | width () const |
Get width of output field.
| |
int | width (const int) |
Set width of output field (and return old width)
| |
int | precision () const |
Get precision of output field.
| |
int | precision (const int) |
Set precision of output field (and return old precision)
| |
ios_base::fmtflags | flags (const ios_base::fmtflags) |
Set flags of stream.
| |
void | print (Ostream &) const |
Print description of IOstream to Ostream.
| |
Static Public Member Functions | |
static bool | write (const commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize) |
Write given buffer to given processor.
| |
static void | waitRequests () |
Non-blocking writes: wait until all have finished.
| |
static bool | finishedRequest (const label i) |
Non-blocking writes: has request i finished?
| |
Protected Attributes | |
int | toProcNo_ |
OPstream | ( | const commsTypes | commsType, |
const int | toProcNo, | ||
const label | bufSize = 0 ,
|
||
streamFormat | format = BINARY ,
|
||
versionNumber | version = currentVersion
|
||
) |
Construct given process index to send to and optional buffer size,.
write format and IO version
Definition at line 95 of file OPstream.C.
~OPstream | ( | ) |
Definition at line 118 of file OPstream.C.
ios_base::fmtflags flags | ( | ) | const [inline, virtual]
|
static bool write | ( | const commsTypes | commsType, |
const int | toProcNo, | ||
const char * | buf, | ||
const std::streamsize | bufSize | ||
) | [inline, static]
|
Write given buffer to given processor.
Definition at line 128 of file OPstream.H.
Referenced by Pstream::combineGather(), Pstream::combineScatter(), mapDistribute::compact(), Pstream::gather(), Pstream::gatherList(), processorPointPatchField< Type >::initSwapAdd(), Pstream::listCombineGather(), Pstream::listCombineScatter(), Pstream::scatter(), Pstream::scatterList(), LUscalarMatrix::solve(), and syncTools::syncBoundaryFaceList().
static void waitRequests | ( | ) | [inline, static]
|
Non-blocking writes: wait until all have finished.
Definition at line 139 of file OPstream.H.
Referenced by mapDistribute::compact(), and GeometricField< Type, PatchField, GeoMesh >::GeometricBoundaryField::evaluate().
static bool finishedRequest | ( | const label | i ) | [inline, static]
|
Non-blocking writes: has request i finished?
Definition at line 145 of file OPstream.H.
Foam::Ostream & write | ( | const token & | ) | [virtual]
|
Write next token to stream.
Implements Ostream.
Definition at line 125 of file OPstream.C.
References notImplemented.
Foam::Ostream & write | ( | const char | c ) | [virtual]
|
Write character.
Implements Ostream.
Definition at line 133 of file OPstream.C.
References Foam::isspace().
Foam::Ostream & write | ( | const char * | str ) | [virtual]
|
Foam::Ostream & write | ( | const word & | str ) | [virtual]
|
Foam::Ostream & write | ( | const string & | str ) | [virtual]
|
Write string.
Implements Ostream.
Definition at line 175 of file OPstream.C.
References token::STRING.
Foam::Ostream & writeQuoted | ( | const std::string & | str, |
const bool | quoted = true
|
||
) | [virtual]
|
Write std::string surrounded by quotes.
Optional write without quotes.
Implements Ostream.
Definition at line 187 of file OPstream.C.
References token::STRING.
Foam::Ostream & write | ( | const label | val ) | [virtual]
|
Write label.
Implements Ostream.
Definition at line 199 of file OPstream.C.
References token::LABEL.
Foam::Ostream & write | ( | const floatScalar | val ) | [virtual]
|
Write floatScalar.
Implements Ostream.
Definition at line 207 of file OPstream.C.
References token::FLOAT_SCALAR.
Foam::Ostream & write | ( | const doubleScalar | val ) | [virtual]
|
Write doubleScalar.
Implements Ostream.
Definition at line 215 of file OPstream.C.
References token::DOUBLE_SCALAR.
Foam::Ostream & write | ( | const char * | data, |
std::streamsize | count | ||
) | [virtual]
|
Write binary block.
Implements Ostream.
Definition at line 223 of file OPstream.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and format().
void indent | ( | ) | [inline, virtual]
|
void flush | ( | ) | [inline, virtual]
|
void endl | ( | ) | [inline, virtual]
|
int width | ( | ) | const [inline, virtual]
|
int width | ( | const | int ) | [inline, virtual]
|
Set width of output field (and return old width)
Implements Ostream.
Definition at line 207 of file OPstream.H.
int precision | ( | ) | const [inline, virtual]
|
int precision | ( | const | int ) | [inline, virtual]
|
Set precision of output field (and return old precision)
Implements Ostream.
Definition at line 219 of file OPstream.H.
ios_base::fmtflags flags | ( | const ios_base::fmtflags | ) | [inline]
|
Set flags of stream.
Definition at line 228 of file OPstream.H.
void print | ( | Ostream & | os ) | const [virtual]
|
Print description of IOstream to Ostream.
Reimplemented from IOstream.
Definition at line 41 of file PstreamsPrint.C.
References Foam::endl().
int toProcNo_ [protected]
|
Definition at line 88 of file OPstream.H.