Dune::FakeMPIHelper Class Reference
#include <mpihelper.hh>
Detailed Description
A fake mpi helper.This helper can be used if no MPI is available or one wants to run sequentially even if MPI is available and used.
Public Types | |
enum | { isFake = true } |
typedef int | MPICommunicator |
The type of the mpi communicator. | |
Public Member Functions | |
int | rank () const |
return rank of process, i.e. zero | |
int | size () const |
return rank of process, i.e. one | |
Static Public Member Functions | |
static MPICommunicator | getCommunicator () |
Get the default communicator. | |
static FakeMPIHelper & | instance (int argc, char **argv) |
Get the singleton instance of the helper. |
Member Enumeration Documentation
anonymous enum |
Member Function Documentation
static MPICommunicator Dune::FakeMPIHelper::getCommunicator | ( | ) | [inline, static] |
Get the default communicator.
- Returns:
- -1 As we are fake.
static FakeMPIHelper& Dune::FakeMPIHelper::instance | ( | int | argc, | |
char ** | argv | |||
) | [inline, static] |
Get the singleton instance of the helper.
This method has to be called with the same arguments that the main method of the program was called:
int main(int argc, char** argv){ MPIHelper::instance(argc, argv); // program code comes here ... }
- Parameters:
-
argc The number of arguments provided to main. argv The arguments provided to main.
The documentation for this class was generated from the following file: