Skip to content
Snippets Groups Projects
Commit b0775e20 authored by Ned Coltman's avatar Ned Coltman Committed by Timo Koch
Browse files

[install][handbook] Modify the description of the quick install

* modify install guidance
* re-add the test_dumux.sh
parent acaf8100
No related branches found
No related tags found
1 merge request!1965Cleanup/installscript
# Test to see if the download and configuration worked properly
cd DUMUX/dumux/build-cmake/test/porousmediumflow/1p/implicit/isothermal
make test_1p_tpfa
./test_1p_tpfa params.input
paraview *pvd
...@@ -3,38 +3,68 @@ For this quick start guide the following software packages are required: ...@@ -3,38 +3,68 @@ For this quick start guide the following software packages are required:
\begin{itemize} \begin{itemize}
\item GitLab client \item GitLab client
\item A standard-compliant C++17 compiler supporting the C++11/C++14/C++17 features of GCC 7 \item A standard-compliant C++17 compiler supporting the C++11/C++14/C++17 features of GCC 7
(\Dumux $> 3.1$\footnote{\Dumux $\leq 3.1$ only requires the C++11/C++14 feature set of GCC 4.9, e.g. GCC 4.9 or newer and Clang 3.8 or newer}), (\Dumux $> 3.1$\footnote{\Dumux $\leq 3.1$ only requires the C++11/C++14 feature set of GCC 4.9,
e.g. GCC 7 or newer and Clang 5 or newer. e.g. GCC 4.9 or newer and Clang 3.8 or newer}), e.g. GCC 7 or newer and Clang 5 or newer.
\item CMake 2.8.12 or newer \item CMake 2.8.12 or newer
\item pkg-config \item pkg-config
\item ParaView (to visualize the results) \item ParaView (to visualize the results)
\end{itemize} \end{itemize}
\section{Obtaining code and configuring all modules with a script} \section{Obtaining code and configuring all modules with a script}
We provide you with a shell-script \texttt{installDumux.sh} that facilitates setting up a {\Dune}/{\Dumux} directory tree To easily install Dumux, we've provided a shell-script \texttt{installdumux.sh} that facilitates
and configures all modules with CMake. setting up a {\Dune}/{\Dumux} directory tree and configures all modules with CMake.
Copy the following lines into a text file named \texttt{installDumux.sh}: First, you will have to download this script. To do this, first navigate to the directory where you
\lstinputlisting[style=DumuxCode, numbersep=5pt, firstline=1, firstnumber=1]{installDumux.sh} want to install \Dumux and \Dune (a single root folder \texttt{DUMUX} will be produced, so you do
not need to provide one). Then use \texttt{wget} to download the script with the following command:
\begin{lstlisting}[style=Bash]
$ wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/raw/releases/3.2/bin/installdumux.sh
\end{lstlisting}
Place the \texttt{installDumux.sh} script in the directory where you want to install \Dumux and \Dune (a single After the download is complete, execute the script. This can be done with
root folder \texttt{DUMUX} will be produced, so you do not need to provide one). Make \texttt{installDumux.sh} executable and run the script by typing into the terminal: \texttt{./installDumux.sh} \begin{lstlisting}[style=Bash]
$ sh installdumux.sh
\end{lstlisting}
Configuring \Dune and \Dumux is done by the command-line script \texttt{dunecontrol} This script will download each of the \Dune-modules that \Dumux depends on at their 2.7 release,
using optimized configure options, see the line entitled \texttt{\# run build} in the \texttt{installDumux.sh} script. as well as \Dumux's 3.2 release. After these individual modules are downloaded, \Dune and \Dumux
are automatically configured using the command-line script \texttt{dunecontrol}, located in
\texttt{dune-common/bin/dunecontrol}, optimized using configure options defined in the \texttt{cmake.opts}
file located in \texttt{dumux/cmake.opts}. The commands beneath the \texttt{\# run dunecontrol} in
the \texttt{installdumux.sh} script execute this configuration script, so no further steps are required.
More details about the build-system can be found in section \ref{buildIt}. More details about the build-system can be found in section \ref{buildIt}.
\subsection{A first test run of \Dumux} \subsection{A first test run of \Dumux}
When the \texttt{installDumux.sh} script from the subsection above has run successfully, you can execute a second script that When the \texttt{installdumux.sh} script from the subsection above has run successfully,
will compile and run a simple one-phase ground water flow example and will visualize the result using ParaView. you run a simple test to ensure that the installation ran correctly. To do this, you can
The test script can be obtained by copying the following lines into a text file named \texttt{test\_dumux.sh} begin by compiling an example problem and running the simulation. You can then visualize
that has to be located in the same directory as the installation script. the results using ParaView. We recommend looking at a basic single phase groundwater flow problem.
\begin{lstlisting}[style=DumuxCode] \begin{enumerate}
\item Navigate to this test in the build directory using:
\begin{lstlisting}[style=Bash]
cd DUMUX/dumux/build-cmake/test/porousmediumflow/1p/implicit/isothermal cd DUMUX/dumux/build-cmake/test/porousmediumflow/1p/implicit/isothermal
make -B test_1p_tpfa \end{lstlisting}
\item Build the executable with the following command:
\begin{lstlisting}[style=Bash]
make test_1p_tpfa
\end{lstlisting}
\item Run the simulation with the parameters listed in \texttt{params.input} like this:
\begin{lstlisting}[style=Bash]
./test_1p_tpfa params.input ./test_1p_tpfa params.input
\end{lstlisting}
\item Visualize the results in paraview with:
\begin{lstlisting}[style=Bash]
paraview *pvd paraview *pvd
\end{lstlisting} \end{lstlisting}
After making \texttt{test\_dumux.sh} executable, it can be executed by typing into the terminal: \texttt{./test\_dumux.sh}. \item Advance ParaView to the next frame (green arrow button) and rescale to data range
If everything works fine, a ParaView window with the result should open automatically, showing the initial (green double arrow on top right) to admire the colorful pressure distribution.
conditions. Advance ParaView to the next frame (green arrow button) and rescale to data range (green double arrow on top right) to admire \end{enumerate}
the colorful pressure distribution.
These commands are compiled into \texttt{test\_dumux.sh}, which you can download and run
from the same directory from which you ran \texttt{installDumux.sh}.
\begin{lstlisting}[style=Bash]
$ wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/raw/releases/3.2/bin/util/test_dumux.sh
$ wget sh test_dumux.sh
\end{lstlisting}
For further information on how to get started with dumux, see Section \ref{chp:tutorial}.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment