AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
Environment Class Reference

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()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Environment()

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().


The documentation for this class was generated from the following files: