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>
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.
Definition at line 80 of file PstreamImpl.H.
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 |
Additional Inherited Members | |
![]() | |
enum | commsTypes { blocking, scheduled, nonBlocking } |
Types of communications. More... |
|
inline |
Construct null.
Definition at line 129 of file PstreamImpl.H.
|
inlinevirtual |
Definition at line 133 of file PstreamImpl.H.
|
staticprotected |
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().
|
staticprotected |
Initialize all communication schedules. Callback from.
Definition at line 59 of file PstreamImpl.C.
Referenced by mpiPstreamImpl::init().
TypeName | ( | "PstreamImpl" | ) |
declareRunTimeSelectionTable | ( | autoPtr | , |
PstreamImpl | , | ||
dictionary | , | ||
() | , | ||
() | |||
) |
|
static |
Return a reference to the selected PstreamImpl implementation.
Definition at line 90 of file PstreamImpl.C.
Add the valid option this type of communications library.
adds/requires on the command line
Implemented in dummyPstreamImpl, and mpiPstreamImpl.
Referenced by Pstream::addValidParOptions().
|
pure virtual |
Initialisation function called from main.
Spawns slave processes and initialises inter-communication
Implemented in dummyPstreamImpl, and mpiPstreamImpl.
Referenced by Pstream::init().
|
pure virtual |
Exit program.
Implemented in dummyPstreamImpl, and mpiPstreamImpl.
Referenced by Pstream::exit(), and PstreamImpl::loadPstreamInstance().
|
pure virtual |
|
pure virtual |
Reduce implementation for scalars (.
Implemented in dummyPstreamImpl, and mpiPstreamImpl.
|
static |
Loads the Pstream implementation library.
Definition at line 107 of file PstreamImpl.C.
References Foam::debug::controlDict(), Foam::endl(), Foam::env(), Foam::exit(), Foam::FatalError, FatalErrorIn, dictionary::found(), Foam::getEnv(), Foam::Info, dictionary::lookup(), dlLibraryTable::open(), Foam::PstreamConfigSectionName(), dictionary::subDict(), and WarningIn.
|
static |
Loads the given type from the Pstream implementation library.
Definition at line 50 of file PstreamImplI.H.
References Foam::debug::controlDict(), Foam::endl(), Foam::env(), PstreamImpl::exit(), Foam::FatalError, FatalErrorIn, Foam::getEnv(), Foam::Info, dictionary::lookup(), Foam::PstreamConfigSectionName(), and dictionary::subDict().
|
friend |
Definition at line 174 of file PstreamImpl.H.