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.
Inheritance diagram for PstreamImpl:
Collaboration diagram for PstreamImpl: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 |
| PstreamImpl | ( | ) | [inline]
|
Construct null.
Definition at line 129 of file PstreamImpl.H.
| virtual ~PstreamImpl | ( | ) | [inline, virtual]
|
Definition at line 133 of file PstreamImpl.H.
| 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.
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.
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 (.
Implemented in dummyPstreamImpl, and mpiPstreamImpl.
| void loadPstreamLibrary | ( | ) | [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.
| autoPtr< T > loadPstreamInstance | ( | const word & | dictEntry, |
| const word & | envName, | ||
| CTable * | ctable | ||
| ) | [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 class Pstream [friend]
|
Definition at line 174 of file PstreamImpl.H.