dune-common
2.2.0
|
A fake mpi helper. More...
#include <dune/common/mpihelper.hh>
Public Types | |
enum | { isFake = true } |
typedef No_Comm | 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 MPICommunicator | getLocalCommunicator () |
get a local communicator | |
static CollectiveCommunication < MPICommunicator > | getCollectiveCommunication () |
static FakeMPIHelper & | instance (int argc, char **argv) |
Get the singleton instance of the helper. |
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.
The type of the mpi communicator.
anonymous enum |
static CollectiveCommunication<MPICommunicator> Dune::FakeMPIHelper::getCollectiveCommunication | ( | ) | [inline, static] |
References getCommunicator().
static MPICommunicator Dune::FakeMPIHelper::getCommunicator | ( | ) | [inline, static] |
get the default communicator
Return a communicator to exchange data with all processes
Referenced by getCollectiveCommunication(), and getLocalCommunicator().
static MPICommunicator Dune::FakeMPIHelper::getLocalCommunicator | ( | ) | [inline, static] |
get a local communicator
Returns a communicator to communicate with the local process only
References getCommunicator().
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 ... }
argc | The number of arguments provided to main. |
argv | The arguments provided to main. |
int Dune::FakeMPIHelper::rank | ( | ) | const [inline] |
return rank of process, i.e. zero
int Dune::FakeMPIHelper::size | ( | ) | const [inline] |
return rank of process, i.e. one