Feel++ 0.91.0

Feel::Environment Class Reference

Initialize, finalize, and query the Feel++ environment. More...

#include <environment.hpp>

List of all members.

Public Member Functions

Constructors, destructor
 Environment ()
 Environment (int &argc, char **&argv)
 ~Environment ()

Static Public Member Functions

Accessors
static bool initialized ()
static bool finalized ()
Methods
static std::string rootRepository ()
static std::string localGeoRepository ()
static boost::tuple
< std::string, bool > 
systemGeoRepository ()
static void changeRepository (boost::format fmt)
 change the directory where the results are stored
static po::variables_map vm (po::options_description const &desc)
 get variables_map from options_description desc

Detailed Description

Initialize, finalize, and query the Feel++ environment.

The Environment class is used to initialize, finalize, and query the Feel++ environment. It will typically be used in the main() function of a program, which will create a single instance of Environment initialized with the arguments passed to the program:

  int main(int argc, char* argv[])
  {
    Feel::Environment env(argc, argv);
  }

The instance of Environment will initialize Feel++ (by calling MPI, PETSc, SLEPc and MAdLib initialization routines) in its constructor and finalize in its destructor.

Author:
Christophe Prud'homme
See also:
Application

Constructor & Destructor Documentation

Feel::Environment::Environment ( )

Initialize the Feel environment.

If the Feel environment has not already been initialized, initializes Feel

Feel::Environment::Environment ( int &  argc,
char **&  argv 
)

Initialize the Feel environment.

If the Feel environment has not already been initialized, initializes Feel

Parameters:
argcThe number of arguments provided in argv, as passed into the program's main function.
argvThe array of argument strings passed to the program via main.
Feel::Environment::~Environment ( )

Shuts down the Feel environment.

If this Environment object was used to initialize the Feel environment, and the Feel environment has not already been shut down (finalized), this destructor will shut down the Feel environment.


Member Function Documentation

bool Feel::Environment::finalized ( ) [static]

Determine if the MPI environment has already been finalized.

The routine is equivalent to a call to MPI_Finalized.

Returns:
true if the MPI environment has been finalized.
bool Feel::Environment::initialized ( ) [static]

Determine if the MPI environment has already been initialized.

This routine is equivalent to a call to MPI_Initialized.

Returns:
true if the MPI environment has been initialized.
std::string Feel::Environment::localGeoRepository ( ) [static]
Returns:
the local geo files repository (default: $HOME/feel/geo)

References rootRepository().

std::string Feel::Environment::rootRepository ( ) [static]
Returns:
the root repository (default: $HOME/feel)

Referenced by changeRepository(), and localGeoRepository().

boost::tuple< std::string, bool > Feel::Environment::systemGeoRepository ( ) [static]
Returns:
a tuple : the system geo files repository (default: /usr/share/feel/geo or /usr/local/share/feel/geo) and true or false whether the directory exists or not