3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Static Public Member Functions | List of all members
Dumux::Parameters Class Reference

Parameter class managing runtime input parameters. More...

#include <dumux/common/parameters.hh>

Description

Parameter class managing runtime input parameters.

Todo:
Doc me!

Static Public Member Functions

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 &params=[](Dune::ParameterTree &) {}, const DefaultParams &defaultParams=[](Dune::ParameterTree &) {})
 Initialize the parameter tree. More...
 
static void init (const std::string &parameterFileName, const DefaultParams &params=[](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 LoggingParameterTreegetTree ()
 Get the parameter tree. More...
 

Member Function Documentation

◆ getTree()

const LoggingParameterTree & Dumux::Parameters::getTree ( )
static

Get the parameter tree.

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

Initialize the parameter tree.

Parameters
paramsa function that sets parameters of the runtime parameter tree
defaultParamsa 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

Initialize the parameter tree.

Parameters
parameterFileNamean input parameter file name
paramsa parameter tree with runtime parameters
inputFileOverwritesParamsif 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
defaultParamsa 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

Initialize the parameter tree singletons.

◆ 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

Initialize the parameter tree.

Parameters
argcnumber of command line argument (forwarded from main)
argvcommand line argument (forwarded from main)
defaultParamsa function that sets parameters of the default runtime parameter tree
parameterFileNamethe file name of the input file
usagethe 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

Initialize the parameter tree singletons.

◆ init() [6/6]

void Dumux::Parameters::init ( int  argc,
char **  argv,
std::string  parameterFileName,
const Usage &  usage = [](const char *, const std::string &){} 
)
static

Initialize the parameter tree singletons.

◆ parseCommandLine()

Dune::ParameterTree Dumux::Parameters::parseCommandLine ( int  argc,
char **  argv 
)
static

Parse command line arguments into a parameter tree.

◆ print()

void Dumux::Parameters::print ( )
static

prints all used and unused parameters


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