waLBerla 7.3
Loading...
Searching...
No Matches
walberla::Environment Class Reference

Detailed Description

RAII Object to initialize waLBerla using command line parameters.

#include <Environment.h>

Public Member Functions

 Environment (int &argc, char **&argv, bool mpiAbortOnException=true)
 Constructor.
 ~Environment ()
shared_ptr< Configconfig ()
 Returns configuration object, or null if no configuration object exists.

Protected Attributes

shared_ptr< Configconfig_
mpi::Environment mpiEnv_

Constructor & Destructor Documentation

◆ Environment()

walberla::Environment::Environment ( int & argc,
char **& argv,
bool mpiAbortOnException = true )

Constructor.

Parameters
argc,argvIf command line parameters are present they have to contain at least the path to the configuration file and optionally pairs of param-value: "-blockName.parameterName=parameterValue" These values are then substituted in configuration files. It is also possible to pass no command line options (see description below )

If command line arguments are present the constructor initializes static objects and singleton classes using information of configuration file

If no command line arguments are present only MPI subsystem is initialized and logging is configured to default state.

◆ ~Environment()

walberla::Environment::~Environment ( )

Member Function Documentation

◆ config()

shared_ptr< Config > walberla::Environment::config ( )
inline

Returns configuration object, or null if no configuration object exists.

Returns
handle to configuration object, if a path to configuration file was in the command line arguments as passed to constructor, otherwise a null pointer

Member Data Documentation

◆ config_

shared_ptr<Config> walberla::Environment::config_
protected

◆ mpiEnv_

mpi::Environment walberla::Environment::mpiEnv_
protected

The documentation for this class was generated from the following files:
  • /builds/administration/walberla-website/walberla/src/core/Environment.h
  • /builds/administration/walberla-website/walberla/src/core/Environment.cpp