Parameter class managing runtime input parameters.
More...
#include <dumux/common/parameters.hh>
|
static void | init (int argc, char **argv, const Usage &usage) |
| Initialize the parameter tree singletons. More...
|
|
static void | init (int argc, char **argv, std::string parameterFileName, const Usage &usage=[](const char *, const std::string &){}) |
| Initialize the parameter tree singletons. More...
|
|
static void | init (int argc, char **argv, const DefaultParams &defaultParams, const Usage &usage) |
| Initialize the parameter tree singletons. More...
|
|
static void | init (int argc, char **argv, const DefaultParams &defaultParams=[](Dune::ParameterTree &) {}, std::string parameterFileName="", const Usage &usage=[](const char *, const std::string &){}) |
| Initialize the parameter tree. More...
|
|
static void | init (const DefaultParams ¶ms=[](Dune::ParameterTree &) {}, const DefaultParams &defaultParams=[](Dune::ParameterTree &) {}) |
| Initialize the parameter tree. More...
|
|
static void | init (const std::string ¶meterFileName, const DefaultParams ¶ms=[](Dune::ParameterTree &) {}, bool inputFileOverwritesParams=true, const DefaultParams &defaultParams=[](Dune::ParameterTree &) {}) |
| Initialize the parameter tree. More...
|
|
static void | print () |
| prints all used and unused parameters More...
|
|
static Dune::ParameterTree | parseCommandLine (int argc, char **argv) |
| Parse command line arguments into a parameter tree. More...
|
|
static const LoggingParameterTree & | getTree () |
| Get the parameter tree. More...
|
|
◆ getTree()
The logging parameter tree recording which parameters are used during the simulation
◆ init() [1/6]
void Dumux::Parameters::init |
( |
const DefaultParams & |
params = [] (Dune::ParameterTree&) {} , |
|
|
const DefaultParams & |
defaultParams = [] (Dune::ParameterTree&) {} |
|
) |
| |
|
static |
- Parameters
-
params | a function that sets parameters of the runtime parameter tree |
defaultParams | a function that sets parameters of the default runtim parameter tree |
- Note
- if a parameter is looked up without explicitly providing a default, the default tree is consulted if the parameter could not be found in the parameter tree
◆ init() [2/6]
void Dumux::Parameters::init |
( |
const std::string & |
parameterFileName, |
|
|
const DefaultParams & |
params = [] (Dune::ParameterTree&) {} , |
|
|
bool |
inputFileOverwritesParams = true , |
|
|
const DefaultParams & |
defaultParams = [] (Dune::ParameterTree&) {} |
|
) |
| |
|
static |
- Parameters
-
parameterFileName | an input parameter file name |
params | a parameter tree with runtime parameters |
inputFileOverwritesParams | if set to true (default) the parameters from the input file have precedence, if set to false the input the parameters provided via params have precedence |
defaultParams | a parameter tree with default parameters |
- Note
- the params function overwrites
-
if a parameter is looked up without explicitly providing a default, the default tree is consulted if the parameter could not be found in the parameter tree
◆ init() [3/6]
void Dumux::Parameters::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
const DefaultParams & |
defaultParams, |
|
|
const Usage & |
usage |
|
) |
| |
|
static |
◆ init() [4/6]
void Dumux::Parameters::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
const DefaultParams & |
defaultParams = [] (Dune::ParameterTree&) {} , |
|
|
std::string |
parameterFileName = "" , |
|
|
const Usage & |
usage = [](const char *, const std::string &){} |
|
) |
| |
|
static |
- Parameters
-
argc | number of command line argument (forwarded from main) |
argv | command line argument (forwarded from main) |
defaultParams | a function that sets parameters of the default runtime parameter tree |
parameterFileName | the file name of the input file |
usage | the usage function to print if the help option was passed on the command line |
- Note
- the default parameter tree is initialized in the following way 1) global defaults (see member function applyGlobalDefaults_) 2) user provided defaults (overwrite global defaults) the parameter tree is initialized in the following way 1) parameters from the input file 2) parameters from the command line (overwrite input file parameters)
-
if a parameter is looked up without explicitly providing a default, the default tree is consulted if the parameter could not be found in the parameter tree
◆ init() [5/6]
void Dumux::Parameters::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
const Usage & |
usage |
|
) |
| |
|
static |
◆ init() [6/6]
void Dumux::Parameters::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
std::string |
parameterFileName, |
|
|
const Usage & |
usage = [](const char *, const std::string &){} |
|
) |
| |
|
static |
◆ parseCommandLine()
Dune::ParameterTree Dumux::Parameters::parseCommandLine |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
◆ print()
void Dumux::Parameters::print |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following files: