FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

Input inter-processor communications stream. More...

#include <OpenFOAM/IPstream.H>


Detailed Description

Input inter-processor communications stream.

Source files

Definition at line 53 of file IPstream.H.

Inheritance diagram for IPstream:
Collaboration diagram for IPstream:

List of all members.

Public Member Functions

 IPstream (const commsTypes commsType, const int fromProcNo, const label bufSize=0, streamFormat format=BINARY, versionNumber version=currentVersion)
 Construct given process index to read from and optional buffer size,.
 ~IPstream ()
ios_base::fmtflags  flags () const
 Return flags of output stream.
Istream &  read (token &)
 Return next token from stream.
Istream &  read (char &)
 Read a character.
Istream &  read (word &)
 Read a word.
Istream &  read (string &)
Istream &  read (label &)
 Read a label.
Istream &  read (floatScalar &)
 Read a floatScalar.
Istream &  read (doubleScalar &)
 Read a doubleScalar.
Istream &  read (char *, std::streamsize)
 Read binary block.
Istream &  rewind ()
 Rewind and return the stream so that it may be read again.
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 label  read (const commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize)
 Read into given buffer from given processor and return the.
static void  waitRequests ()
 Non-blocking receives: wait until all have finished.
static bool  finishedRequest (const label i)
 Non-blocking receives: has request i finished?

Constructor & Destructor Documentation

IPstream ( const commsTypes   commsType,
const int   fromProcNo,
const label   bufSize = 0,
streamFormat   format = BINARY,
versionNumber   version = currentVersion  
)

Construct given process index to read from and optional buffer size,.

read format and IO version

Definition at line 39 of file IPstream.C.

~IPstream (  )

Definition at line 105 of file IPstream.C.


Member Function Documentation

ios_base::fmtflags flags (  ) const [inline, virtual]

Return flags of output stream.

Implements IOstream.

Definition at line 114 of file IPstream.H.

static label read ( const commsTypes   commsType,
const int   fromProcNo,
char *   buf,
const std::streamsize   bufSize  
) [inline, static]
static void waitRequests (  ) [inline, static]

Non-blocking receives: wait until all have finished.

Definition at line 136 of file IPstream.H.

Referenced by mapDistribute::compact(), and GeometricField< Type, PatchField, GeoMesh >::GeometricBoundaryField::evaluate().

static bool finishedRequest ( const label   i  ) [inline, static]

Non-blocking receives: has request i finished?

Definition at line 142 of file IPstream.H.

Foam::Istream & read ( char &   c  ) [virtual]

Read a character.

Implements Istream.

Definition at line 258 of file IPstream.C.

Foam::Istream & read ( word &   str  ) [virtual]

Read a word.

Implements Istream.

Definition at line 267 of file IPstream.C.

Foam::Istream & read ( string &   str  ) [virtual]

Implements Istream.

Definition at line 278 of file IPstream.C.

Foam::Istream & read ( label &   val  ) [virtual]

Read a label.

Implements Istream.

Definition at line 289 of file IPstream.C.

Foam::Istream & read ( floatScalar &   val  ) [virtual]

Read a floatScalar.

Implements Istream.

Definition at line 296 of file IPstream.C.

Foam::Istream & read ( doubleScalar &   val  ) [virtual]

Read a doubleScalar.

Implements Istream.

Definition at line 303 of file IPstream.C.

Foam::Istream & read ( char *   data,
std::streamsize   count  
) [virtual]

Read binary block.

Implements Istream.

Definition at line 310 of file IPstream.C.

References Foam::abort(), Foam::FatalError, FatalErrorIn, and format().

Foam::Istream & rewind (  ) [virtual]

Rewind and return the stream so that it may be read again.

Implements Istream.

Definition at line 324 of file IPstream.C.

ios_base::fmtflags flags ( const ios_base::fmtflags    ) [inline]

Set flags of stream.

Definition at line 178 of file IPstream.H.

void print ( Ostream &   os  ) const [virtual]

Print description of IOstream to Ostream.

Reimplemented from IOstream.

Definition at line 34 of file PstreamsPrint.C.

References Foam::endl(), and Pstream::myProcNo().


The documentation for this class was generated from the following files: