Simulation parameters can be parsed to the program via a parameter file or via the command line.
Simulation parameters can be parsed to the program via a parameter file or via the command line.
After having run the example application from the getting started guide you will
After having run the example application from the getting started guide you will get the following output at the end of the simulation run. If you did not get the output, call Dumux::Parameters::print() in your main file.
get the following output at the end of the simulation run
\footnote{If you did not get the output, add \texttt{Parameters::print();} to your main file.}:
```bash
\begin{lstlisting}[style=Bash]
# Runtime-specified parameters used:
# Runtime-specified parameters used:
[ Grid ]
[ Grid ]
Cells ="48 32"
Cells ="48 32"
...
@@ -58,44 +54,43 @@ AddVelocity = "false"
...
@@ -58,44 +54,43 @@ AddVelocity = "false"
# Unused parameters:
# Unused parameters:
Grid.LowerLeft ="0 0"
Grid.LowerLeft ="0 0"
\end{lstlisting}
```
A number of things can be learned:
A number of things can be learned:
\begin{itemize}
\item\emph{run-time} parameters can be changed without re-compiling
\item\emph{default parameters} are set by default
\item\emph{unused} parameters are not used by the simulation (maybe typo or wrong group in input file)
\end{itemize}
* run-time parameters can be changed without re-compiling
* default parameters are set by default
* unused parameters are not used by the simulation (maybe typo or wrong group in input file)
\subsection{Parameter Values}
## Parameter Values
To get the value of an input parameter please use:
To get the value of an input parameter please use:
As this function call is relatively expensive, the respective variables should always be \texttt{static} (e.g., if used in a loop). When dealing with multiple group names, e.g., in the context of coupled models, the following methods might be more convenient:
As this function call is relatively expensive, the respective variables should always be `static` (e.g., if used in a loop). When dealing with multiple group names, e.g., in the context of coupled models, the following methods might be more convenient: