|
dune-fem 2.12-git
|
#include <dune/fem/io/parameter/container.hh>

Classes | |
| struct | DGFBlock |
Public Types | |
| typedef BasicParameterReader< ParameterContainerData > | ThisType |
Public Member Functions | |
| operator ParameterReader () const | |
| cast into ParameterReader | |
| void | append (int &argc, char **argv) |
| add parameters from the command line | |
| void | append (const std::string &filename) |
| add parameters from a file | |
| void | append (const std::string &key, const std::string &value, bool force=false) |
| add a single parameter to the container | |
| template<class T > | |
| std::string | toString (const T &value) |
| A helper function to convert numbers to scientific strings. | |
| template<class NumberType , std::enable_if_t< std::is_floating_point< NumberType >::value||std::is_integral< NumberType >::value, int > = 0> | |
| void | append (const std::string &key, NumberType value, bool force=false) |
| add a single Floating number parameter to the container | |
| void | appendDGF (const std::string &filename) |
| add parameters from a DGF file | |
| void | clear () |
| clear all parameters | |
| bool | verbose (const int level=ParameterContainerData::defaultVerbosityLevel) const |
| obtain the cached value for fem.verbose | |
| std::string | commonInputPath () const |
| std::string | commonOutputPath () const |
| void | write (std::ostream &out, bool writeAll=true) const |
| write the parameter database to a stream | |
| auto | write () const |
| bool | exists (const std::string &key) const |
| check, whether a parameter is defined | |
| void | get (const std::string &key, T &value) const |
| get mandatory parameter | |
| void | get (const std::string &key, const T &defaultValue, T &value) const |
| get optional parameter | |
| void | get (const std::string &key, const char *defaultValue, std::string &value) const |
| get optional parameter (special case for string) | |
| void | getValid (const std::string &key, const Validator &validator, T &value) const |
| get mandatory parameter | |
| void | getValid (const std::string &key, const T &defaultValue, const Validator &validator, T &value) const |
| get optional parameter | |
| T | getValue (const std::string &key) const |
| get mandatory parameter | |
| T | getValue (const std::string &key, const T &defaultValue) const |
| get optional parameter | |
| T | getValidValue (const std::string &key, const Validator &validator) const |
| get optional parameter | |
| T | getValidValue (const std::string &key, const T &defaultValue, const Validator &validator) const |
| get optional parameter | |
| int | getEnum (const std::string &key, const std::string(&values)[n]) const |
| int | getEnum (const std::string &key, const std::string(&values)[n], int defaultValue) const |
| int | getEnum (const std::string &key, const std::vector< std::string > &values) const |
| int | getEnum (const std::string &key, const std::vector< std::string > &values, int defaultValue) const |
| ThisType * | clone () const |
| ParameterContainerData | parameter () |
| const ParameterContainerData | parameter () const |
| void | reset () |
Public Attributes | |
| std::map< std::string, std::set< std::pair< std::string, std::string > > > | localParameterLog_ |
Protected Attributes | |
| ParameterContainerData | parameter_ |
Member Typedef Documentation
◆ ThisType
|
inherited |
Member Function Documentation
◆ append() [1/4]
|
inline |
add parameters from a file
- Parameters
-
[in] filename name of the file containing the parameters
◆ append() [2/4]
|
inline |
add a single parameter to the container
- Parameters
-
[in] key key of the parameter to add [in] value value of the parameter to add [in] force replace parameter, if it exists
◆ append() [3/4]
|
inline |
add a single Floating number parameter to the container
- Parameters
-
[in] key key of the parameter to add [in] value value of the parameter to add [in] force replace parameter, if it exists
◆ append() [4/4]
|
inline |
add parameters from the command line
This mehtod adds all parameters (strings containing a colon) in the command line to the container. The parameters are then removed from the command line.
- Parameters
-
[in] argc number of arguments (as given to main) [in] argv vector of arguments (as given to main)
◆ appendDGF()
|
inline |
add parameters from a DGF file
Parameters can also be read from a DGF file containing a 'FemParameter' block.
- Parameters
-
[in] filename name of the DGF file containing the parameters
◆ clear()
|
inline |
clear all parameters
◆ clone()
|
inlineinherited |
◆ commonInputPath()
|
inline |
◆ commonOutputPath()
|
inline |
◆ exists()
|
inlineinherited |
check, whether a parameter is defined
- Parameters
-
[in] key name of the parameter to check
- Returns
- true, if the parameter is found, false otherwise
◆ get() [1/3]
|
inlineinherited |
get optional parameter (special case for string)
- Note
- This method returns a default value, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get [in] defaultValue default value for this parameter [out] value value of the parameter
◆ get() [2/3]
|
inlineinherited |
get optional parameter
- Note
- This method returns a default value, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get [in] defaultValue default value for this parameter [out] value value of the parameter
◆ get() [3/3]
|
inlineinherited |
get mandatory parameter
- Note
- This method throws an exception, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get [out] value value of the parameter
◆ getEnum() [1/4]
|
inlineinherited |
◆ getEnum() [2/4]
|
inlineinherited |
◆ getEnum() [3/4]
|
inlineinherited |
◆ getEnum() [4/4]
|
inlineinherited |
◆ getValid() [1/2]
|
inlineinherited |
get optional parameter
- Note
- This method returns a default value, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get [in] defaultValue default value for this parameter [in] validator validator for the parameter value [out] value value of the parameter
◆ getValid() [2/2]
|
inlineinherited |
get mandatory parameter
- Note
- This method throws an exception, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get [in] validator validator for the parameter value [out] value value of the parameter
◆ getValidValue() [1/2]
|
inlineinherited |
get optional parameter
- Note
- This method returns a default value, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get [in] defaultValue default value for this parameter [in] validator validator for the parameter value
- Returns
- value of the parameter
◆ getValidValue() [2/2]
|
inlineinherited |
get optional parameter
- Note
- This method returns a default value, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get [in] validator validator for the parameter value
- Returns
- value of the parameter
◆ getValue() [1/2]
|
inlineinherited |
get mandatory parameter
- Note
- This method throws an exception, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get
- Returns
- value of the parameter
◆ getValue() [2/2]
|
inlineinherited |
get optional parameter
- Note
- This method returns a default value, if the parameter cannot be found.
- Parameters
-
[in] key name of the parameter to get [in] defaultValue default value for this parameter
- Returns
- value of the parameter
◆ operator ParameterReader()
|
inline |
cast into ParameterReader
◆ parameter() [1/2]
|
inlineinherited |
◆ parameter() [2/2]
|
inlineinherited |
◆ reset()
|
inlineinherited |
◆ toString()
|
inline |
A helper function to convert numbers to scientific strings.
- Parameters
-
[in] value the value to be converted (needs a << operator)
◆ verbose()
|
inline |
obtain the cached value for fem.verbose
◆ write() [1/2]
|
inline |
◆ write() [2/2]
|
inline |
write the parameter database to a stream
This method writes paramters to the given stream. If the second parameter is true all parameters are written; otherwise only used parameters which do not coincide with the default value are written.
- Note
- This method is not safe for parallel jobs. Parameters are written on all ranks.
- Parameters
-
[in] out stream for the parameters. [in] writeAll default is true
Member Data Documentation
◆ localParameterLog_
| std::map<std::string,std::set<std::pair<std::string,std::string> > > Dune::Fem::ParameterContainer::localParameterLog_ |
◆ parameter_
|
protectedinherited |
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8