Dune::MPIHelper Class Reference
[Parallel Communication]

A real mpi helper.This helper should be used for parallel programs. More...

#include <dune/common/mpihelper.hh>

List of all members.

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 CollectiveCommunication
< MPICommunicator
getCollectiveCommunication ()
static MPIHelperinstance (int &argc, char **&argv)
 Get the singleton instance of the helper.

Detailed Description

A real mpi helper.

This helper should be used for parallel programs.


Member Typedef Documentation

The type of the mpi communicator.


Member Enumeration Documentation

anonymous enum
Enumerator:
isFake 

Are we fake (i. e. pretend to have MPI support but are compiled without.


Member Function Documentation

static CollectiveCommunication<MPICommunicator> Dune::MPIHelper::getCollectiveCommunication (  )  [inline, static]

References getCommunicator().

static MPICommunicator Dune::MPIHelper::getCommunicator (  )  [inline, static]

Get the default communicator.

Returns:
MPI_COMM_WORLD

Referenced by getCollectiveCommunication().

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
   ...
 }
Parameters:
argc The number of arguments provided to main.
argv The arguments provided to main.
int Dune::MPIHelper::rank (  )  const [inline]

return rank of process

int Dune::MPIHelper::size (  )  const [inline]

return number of processes


The documentation for this class was generated from the following file:
Generated on Mon Apr 26 10:45:23 2010 for dune-common by  doxygen 1.6.3