#include <mpihelper.hh>
This helper should be used for parallel programs.
Public Types | |
enum | { isFake = false } |
typedef MPI_Comm | MPICommunicator |
The type of the mpi communicator. | |
Public Member Functions | |
int | rank () const |
return rank of process | |
int | size () const |
return number of processes | |
Static Public Member Functions | |
static MPICommunicator | getCommunicator () |
Get the default communicator. | |
static MPIHelper & | instance (int &argc, char **&argv) |
Get the singleton instance of the helper. |
anonymous enum |
static MPICommunicator Dune::MPIHelper::getCommunicator | ( | ) | [inline, static] |
Get the default communicator.
static MPIHelper& Dune::MPIHelper::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 ... }
argc | The number of arguments provided to main. | |
argv | The arguments provided to main. |