Commit 506636de authored by Katharina Heck's avatar Katharina Heck
Browse files

[handbook] property and parameters changes

parent 6f64ee18
......@@ -62,6 +62,21 @@ A number of things can be learned:
\item \emph{unused} parameters are not used by the simulation (maybe typo or wrong group in input file)
\subsection{Parameter Values}
If you want to get the value of a parameter please use:
paramname_ = getParam<TYPE>("GROUPNAME.PARAMNAME");
If you also want to set a default value for a parameter, just add it like this:
paramname_ = getParam<TYPE>("GROUPNAME.PARAMNAME", default);
For further information you can also look at the \Dumux tutorial, especially exercise 1.
All applications have a help message which you can read by giving
\texttt{--help} as a command line argument to the application.
For further details, please have a look at \texttt{Dune::ParameterTree}
......@@ -379,19 +379,9 @@ $ int NumSeats = '5' defined at
$ int TopSpeed = '::Dumux::Properties::GetProperty<TypeTag, ::Dumux::Properties::PTag::GasUsage>::p::value * 30' defined at
\subsection{Property and Parameter Values}
In \Dumux three different ways to obtain the value of a property are available:
\subsection{Property Values}
To get the value of a property use:
\item[\texttt{{\small GET\_PROP\_VALUE:}}]
Always returns the \emph{compile-time} specified value of the property. This is
needed for properties, which are not intended to be changed by parameter files.
\item[\texttt{{\small GET\_PARAM\_FROM\_GROUP:}}]
Returns the compile-time specified value, if this value is not be overwritten
by the parameter input file.
\item[\texttt{{\small GET\_RUNTIME\_PARAM\_FROM\_GROUP:}}]
Always returns a \emph{run-time} specified value. If the value is not specified
at run-time an error is thrown. This is needed for problem specific properties
or properties, which do not have a meaningful default value.
Always returns the \emph{compile-time} specified value of the property.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment