diff --git a/doc/handbook/4_newfoldersetup.tex b/doc/handbook/4_newfoldersetup.tex index c1700cd9a09937afa0048f9c1de08b201208c2bb..eff2a3c3c0cad84d5f956598137747a9184fa079 100644 --- a/doc/handbook/4_newfoldersetup.tex +++ b/doc/handbook/4_newfoldersetup.tex @@ -13,12 +13,15 @@ the build system there is a new one. \end{enumerate} \paragraph{Adding new Test Programs} -\noindent To add a test use the \texttt{add\_dumux\_test} macro. -The command has four arguments: -\begin{enumerate}[1)] - \item name of test (has to be unique) - \item name of executable - \item source file (*.cc) - \item command to be executed as test - either the executable or a - some helper script with arguments -\end{enumerate} +\noindent To add a test use the \texttt{add\_dune\_test} macro within the \texttt{CMakeList.txt} file. +The macro can be used with a variable amount of arguments. A simple call could look like this: + +\begin{lstlisting}[style=DumuxCode] +dune_add_test(NAME my_test + SOURCES mainfile.cc + CMD_ARGS my_test params.input) +\end{lstlisting} + +Here, we create an exectuable called \texttt{my\_test} from a source file \texttt{mainfile.cc}. +The name of the test will also be \texttt{my\_test} (has to be unique). The last argument specifies a command - here, we just run the executbable \texttt{my\_test} with an input file \texttt{params.input}. For more advanced uses of +the \texttt{add\_dune\_test} macro, have a look at the \texttt{test} directory. A complete documentation is given \href{https://www.dune-project.org/sphinx/core-2.5/}{here} diff --git a/doc/handbook/4_parameterfiles.tex b/doc/handbook/4_parameterfiles.tex index df325e477a878c6592c4cfdfd58dcdacdd9bb5eb..fd7e828904fc01049ad45c49572109933e1dda55 100644 --- a/doc/handbook/4_parameterfiles.tex +++ b/doc/handbook/4_parameterfiles.tex @@ -5,9 +5,7 @@ A list of all available parameters is provided in the Doxygen documentation: \te After having run the example application from section \ref{quick-start-guide} you will get the following output at the end of the simulation run -\footnote{If you did not get the output, restart the application the following way: -\texttt{./test{\_}2p{\_}incompressible{\_}tpfa test{\_}2p.input -PrintParameters true}, -this will print the parameters once your simulation is finished}: +\footnote{If you did not get the output, add \texttt{Parameters::print();} to your main file.}: \begin{lstlisting}[style=Bash] # Runtime-specified parameters used: [ Grid ] @@ -24,8 +22,9 @@ DtInitial = "250" TEnd = "3000" # Default parameters used: -[ Implicit ] +[ Assembly ] NumericDifferenceMethod = "1" +[ Flux ] UpwindWeight = "1.0" [ LinearSolver ] MaxIterations = "250" @@ -64,20 +63,37 @@ A number of things can be learned: \subsection{Parameter Values} -If you want to get the value of a parameter please use: +To get the value of an input parameter please use: \begin{lstlisting}[name=propsyscars,style=DumuxCode] -paramname_ = getParam<TYPE>("GROUPNAME.PARAMNAME"); +static const TYPE 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); +static const TYPE paramname = getParam<TYPE>("GROUPNAME.PARAMNAME", default); \end{lstlisting} -For further information you can also look at the \Dumux tutorial, especially exercise 1. +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 fowolling methods might be more convenient: + +\begin{lstlisting}[name=propsyscars,style=DumuxCode] +auto modelParamGroup0 = "Model0"; +static const TYPE paramname0 = getParamFromGroup<TYPE>(modelParamGroup0, "GROUPNAME.PARAMNAME"); +auto modelParamGroup1 = "Model1"; +static const TYPE paramname1 = getParamFromGroup<TYPE>(modelParamGroup1, "GROUPNAME.PARAMNAME"); +\end{lstlisting} + +The \texttt{FVProblem} class provides a convenience function \texttt{paramGroup()}.\\ + +The parameters can then be specified in the input file: + +\begin{lstlisting}[style=Bash] +[ Model0.Grid ] +File = file0.dgf +[ Model1.Grid ] +File = file1.dgf +\end{lstlisting} + + +For further details, please have a 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} -in the \Dune documentation. diff --git a/doc/handbook/4_structure.tex b/doc/handbook/4_structure.tex index 649eb2f79a08ee53ce60c43b7fa35f94d90c6dcc..0c1dfbf496f70e3371377bbca87afd2a250113e6 100644 --- a/doc/handbook/4_structure.tex +++ b/doc/handbook/4_structure.tex @@ -15,7 +15,6 @@ \texttt{*.cc}, the problem definition \texttt{*problem.hh}, and an input file \texttt{*.input}. If necessary, spatially dependent parameters are defined in \texttt{*spatialparameters.hh}. For more detailed descriptions of the tests, please have a look at the Doxygen documentation. -\item \texttt{tutorial}: contains the tutorials. \end{itemize} \begin{figure} @@ -71,20 +70,16 @@ [.\node[SecondLevel] {properties}; \node[ThirdLevel] {Base properties for all models.}; ] + [.\node[SecondLevel] {typetraits}; + \node[ThirdLevel] {Helper classes to query type information on compile-time. }; + ] ] [.\node[FirstLevel] {discretization}; -% [.\node[SecondLevel] {\emph{models}}; - \node[ThirdLevel] {Common methods for all discretizations: variable caching, advective and diffusive fluxes, upwinding...}; -% ] - [.\node[SecondLevel] {box}; - \node[ThirdLevel] {Specific files for the box finite volume method: - specifications for advective and diffusive fluxes...}; - ] - [.\node[SecondLevel] {cellcentered}; - \node[ThirdLevel] {Specific files for cell centered finite volume methods.}; - ] - [.\node[SecondLevel] {staggered}; - \node[ThirdLevel] {Specific files for staggered finite volume method.}; + \node[ThirdLevel] {Common methods for all discretizations (box, cell-centered TPFA/MPFA, staggered grid): variable caching, advective and diffusive fluxes, ...}; + ] + [.\node[FirstLevel] {flux}; + [\node[ThirdLevel] { + Collection of classes used to calculate advective and diffusive fluxes.}; ] ] [.\node[FirstLevel] {freeflow}; @@ -93,6 +88,11 @@ and eddy-viscosity based Reynolds-averaged Navier-Stokes turbulence models.}; ] ] + [.\node[FirstLevel] {geomechanics}; + [.\node[SecondLevel] {\emph{models}}; + \node[ThirdLevel] {Elastic and poro-elastic geomechanics models.}; + ] + ] [.\node[FirstLevel] {io}; \node[ThirdLevel] {Additional in-/output possibilities like restart files, gnuplot-interface, VTKWriter extensions and files for grid generation.}; @@ -126,28 +126,35 @@ ] [.\node[SecondLevel] {fluidstates}; \node[ThirdLevel] {Fluid states are responsible for caching the thermodynamic - configuration of a system at a given spatial and temporal position.}; + configuration of a fluid system at a given spatial and temporal position.}; ] [.\node[SecondLevel] {fluidsystems}; \node[ThirdLevel] {Fluid systems express the thermodynamic relations between quantities.}; ] + [.\node[SecondLevel] {solidstates}; + \node[ThirdLevel] {Solid states are responsible for caching the thermodynamic + configuration of a solid system at a given spatial and temporal position.}; + ] + [.\node[SecondLevel] {solidsystems}; + \node[ThirdLevel] {Solid systems express the thermodynamic properties of a solid.}; + ] [.\node[SecondLevel] {spatialparams}; \node[ThirdLevel] {Base class for all spatially dependent variables, like permeability and porosity. Includes spatial averaging routines. All other properties are specified in the specific files of the respective models.}; ] ] - [.\node[FirstLevel] {mixeddimension}; + [.\node[FirstLevel] {multidomain}; \node[ThirdLevel] { - Coupled model with different dimensions.}; + Common infrastructure to couple multiple domains, models or physics.}; [.\node[SecondLevel] {embedded}; - \node[ThirdLevel] {Embedded mixed dimension method.}; + \node[ThirdLevel] {Embedding of a lower-dimensional model into a higher-dimensional one}; ] [.\node[SecondLevel] {facet}; - \node[ThirdLevel] {Facet mixed dimension method.}; + \node[ThirdLevel] {Mixed-dimensional coupling at facets.}; ] - [.\node[SecondLevel] {glue}; - \node[ThirdLevel] {Grid glue backend.}; + [.\node[SecondLevel] {boundary}; + \node[ThirdLevel] {Coupling at the domain boundaries.}; ] ] [.\node[FirstLevel] {nonlinear};