Parameter class managing runtime input parameters.
More...
#include <dumux/common/parameters.hh>
Parameter class managing runtime input parameters.
- Todo:
- Doc me!
|
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()
Get the parameter tree.
The logging parameter tree recording which parameters are used during the simulation
◆ init() [1/6]
static void Dumux::Parameters::init |
( |
const DefaultParams & |
params = [] (Dune::ParameterTree&) {} , |
|
|
const DefaultParams & |
defaultParams = [] (Dune::ParameterTree&) {} |
|
) |
| |
|
inlinestatic |
Initialize the parameter tree.
- 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]
static void Dumux::Parameters::init |
( |
const std::string & |
parameterFileName, |
|
|
const DefaultParams & |
params = [] (Dune::ParameterTree&) {} , |
|
|
bool |
inputFileOverwritesParams = true , |
|
|
const DefaultParams & |
defaultParams = [] (Dune::ParameterTree&) {} |
|
) |
| |
|
inlinestatic |
Initialize the parameter tree.
- 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]
static void Dumux::Parameters::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
const DefaultParams & |
defaultParams, |
|
|
const Usage & |
usage |
|
) |
| |
|
inlinestatic |
Initialize the parameter tree singletons.
◆ init() [4/6]
static void Dumux::Parameters::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
const DefaultParams & |
defaultParams = [] (Dune::ParameterTree&) {} , |
|
|
std::string |
parameterFileName = "" , |
|
|
const Usage & |
usage = [](const char *, const std::string &){} |
|
) |
| |
|
inlinestatic |
Initialize the parameter tree.
- 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]
static void Dumux::Parameters::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
const Usage & |
usage |
|
) |
| |
|
inlinestatic |
Initialize the parameter tree singletons.
◆ init() [6/6]
static void Dumux::Parameters::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
std::string |
parameterFileName, |
|
|
const Usage & |
usage = [](const char *, const std::string &){} |
|
) |
| |
|
inlinestatic |
Initialize the parameter tree singletons.
◆ parseCommandLine()
static Dune::ParameterTree Dumux::Parameters::parseCommandLine |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
inlinestatic |
Parse command line arguments into a parameter tree.
◆ print()
static void Dumux::Parameters::print |
( |
| ) |
|
|
inlinestatic |
prints all used and unused parameters
The documentation for this class was generated from the following file: