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

Abstract base class for Pstream operations that depend on the parallel library used. Foam::PstreamImpl::New will lookup the entry "PstreamImplementation" in the global controlDict file (i.e. the one found by Foam::dotFoam) and tries to first load a library named lib<PstreamImplementation>Pstream.so, and then instantiate the class <PstreamImplementation>PstreamImpl. More...

#include <OpenFOAM/PstreamImpl.H>


Detailed Description

Abstract base class for Pstream operations that depend on the parallel library used. Foam::PstreamImpl::New will lookup the entry "PstreamImplementation" in the global controlDict file (i.e. the one found by Foam::dotFoam) and tries to first load a library named lib<PstreamImplementation>Pstream.so, and then instantiate the class <PstreamImplementation>PstreamImpl.

Source files

Definition at line 80 of file PstreamImpl.H.

Inheritance diagram for PstreamImpl:
Collaboration diagram for PstreamImpl:

List of all members.

Public Member Functions

 TypeName ("PstreamImpl")
 declareRunTimeSelectionTable (autoPtr, PstreamImpl, dictionary,(),())
 PstreamImpl ()
 Construct null.
virtual  ~PstreamImpl ()
virtual void  addValidParOptions (HashTable< string > &validParOptions)=0
 Add the valid option this type of communications library.
virtual bool  init (int &argc, char **&argv, int &myProcNo, List< int > &procIDs, bool &isParallel)=0
 Initialisation function called from main.
virtual void  exit (int errnum)=0
 Exit program.
virtual void  abort ()=0
 Abort program.
virtual void  reduce (scalar &Value, const sumOp< scalar > &bop)=0
 Reduce implementation for scalars (.

Static Public Member Functions

static autoPtr< PstreamImpl >  New ()
 Return a reference to the selected PstreamImpl implementation.
static void  loadPstreamLibrary ()
 Loads the Pstream implementation library.
template<class T , class CTable >
static autoPtr< T >  loadPstreamInstance (const word &dictEntry, const word &envName, CTable *ctable)
 Loads the given type from the Pstream implementation library.

Static Protected Member Functions

static void  setParRun (bool &isParallel)
 Set data for parallel running.
static void  initCommunicationSchedule ()
 Initialize all communication schedules. Callback from.

Friends

class  Pstream

Constructor & Destructor Documentation

PstreamImpl (  ) [inline]

Construct null.

Definition at line 129 of file PstreamImpl.H.

virtual ~PstreamImpl (  ) [inline, virtual]

Definition at line 133 of file PstreamImpl.H.


Member Function Documentation

void setParRun ( bool &   isParallel  ) [static, protected]

Set data for parallel running.

Definition at line 50 of file PstreamImpl.C.

References Pstream::myProcNo(), Foam::name(), Foam::Perr, Foam::Pout, and prefixOSstream::prefix().

void initCommunicationSchedule (  ) [static, protected]

Initialize all communication schedules. Callback from.

PstreamImpl::init()

Definition at line 59 of file PstreamImpl.C.

Referenced by mpiPstreamImpl::init().

TypeName ( "PstreamImpl"    )
declareRunTimeSelectionTable ( autoPtr   ,
PstreamImpl   ,
dictionary   ,
()   ,
()    
)
Foam::autoPtr< Foam::PstreamImpl > New (  ) [static]

Return a reference to the selected PstreamImpl implementation.

Definition at line 90 of file PstreamImpl.C.

virtual void addValidParOptions ( HashTable< string > &   validParOptions  ) [pure virtual]

Add the valid option this type of communications library.

adds/requires on the command line

Implemented in dummyPstreamImpl, and mpiPstreamImpl.

virtual bool init ( int &   argc,
char **&   argv,
int &   myProcNo,
List< int > &   procIDs,
bool &   isParallel  
) [pure virtual]

Initialisation function called from main.

Spawns slave processes and initialises inter-communication

Implemented in dummyPstreamImpl, and mpiPstreamImpl.

virtual void exit ( int   errnum  ) [pure virtual]

Exit program.

Implemented in dummyPstreamImpl, and mpiPstreamImpl.

Referenced by PstreamImpl::loadPstreamInstance().

virtual void abort (  ) [pure virtual]

Abort program.

Implemented in dummyPstreamImpl, and mpiPstreamImpl.

virtual void reduce ( scalar &   Value,
const sumOp< scalar > &   bop  
) [pure virtual]

Reduce implementation for scalars (.

See also:
PstreamReduceOps.H)

Implemented in dummyPstreamImpl, and mpiPstreamImpl.

autoPtr< T > loadPstreamInstance ( const word &   dictEntry,
const word &   envName,
CTable *   ctable  
) [static]

Friends And Related Function Documentation

friend class Pstream [friend]

Definition at line 174 of file PstreamImpl.H.


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