diff --git a/doc/handbook/4_parameterfiles.tex b/doc/handbook/4_parameterfiles.tex index fd9d0284528a855f827da67e1e3146efaaa43e12..df325e477a878c6592c4cfdfd58dcdacdd9bb5eb 100644 --- a/doc/handbook/4_parameterfiles.tex +++ b/doc/handbook/4_parameterfiles.tex @@ -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) \end{itemize} + +\subsection{Parameter Values} +If you want to get the value of a parameter please use: +\begin{lstlisting}[name=propsyscars,style=DumuxCode] +paramname_ = getParam<TYPE>("GROUPNAME.PARAMNAME"); +\end{lstlisting} + +If you also want to set a default value for a parameter, just add it like this: + +\begin{lstlisting}[name=propsyscars,style=DumuxCode] +paramname_ = getParam<TYPE>("GROUPNAME.PARAMNAME", default); +\end{lstlisting} + +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} diff --git a/doc/handbook/5_propertysystem.tex b/doc/handbook/5_propertysystem.tex index d283dc07d465394d1b36e341336c2122f7d8158b..e66b20aae04d9a004962bdee90234a1e4820235c 100644 --- a/doc/handbook/5_propertysystem.tex +++ b/doc/handbook/5_propertysystem.tex @@ -379,19 +379,9 @@ $ int NumSeats = '5' defined at test_propertysystem.cc:55 $ int TopSpeed = '::Dumux::Properties::GetProperty<TypeTag, ::Dumux::Properties::PTag::GasUsage>::p::value * 30' defined at test_propertysystem.cc:54 \end{lstlisting} -\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: \begin{description} \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. \end{description}