Establishes an environment for sequential and parallel AMDiS programs. More...
#include <Environment.hpp>
Public Member Functions | |
Environment (std::string const &initFileName="") | |
Create an environment without mpi initialization, with a fixed initfile given as string. | |
Environment (int &argc, char **&argv, std::string const &initFileName="") | |
~Environment () | |
Finishes MPI and PETSc. | |
Static Public Member Functions | |
static int | mpiRank () |
Return the MPI_Rank of the current processor. | |
static int | mpiSize () |
Return the MPI_Size of the group created by Dune::MPIHelper. | |
static Dune::MPIHelper & | mpiHelper () |
Return a reference to the stored MPIHelper. | |
static Dune::MPIHelper::MPICommunicator | comm () |
Return the MPI_Comm object (or a fake communicator) | |
static int | infoLevel () |
Return the info level for messages in info() | |
static bool | msgAllRanks () |
Return whether all ranks print msg() | |
Establishes an environment for sequential and parallel AMDiS programs.
This object initializes the MPI environment, parses initfiles and may initialize other external libraries. It is constructed with the program commandline arguments. In its destruction, the MPI environment is finalized. In the vast majority of AMDiS programs, an instance of Environment should be declared at the very beginning of the main function.
Environment | ( | int & | argc, |
char **& | argv, | ||
std::string const & | initFileName = "" |
||
) |
Create an environment with initialization of MPI and initifiles from commandline arguments or the provided initfile filename.
References Initfile::init().