\section{External Tools}
\label{sc_externaltools}

\subsection{Git}
Git is a version control tool which we use.
The basic Git commands are:
\begin{itemize}
  \item \texttt{git checkout}: receive a specified branch from the repository
  \item \texttt{git clone}: clone a repository; creates a local copy
  \item \texttt{git diff}: to see the actual changes compared to your last commit
  \item \texttt{git pull}: pull changes from the repository; synchronizes the
  repository with your local copy
  \item \texttt{git push}: push comitted changes to the repository;  synchronizes
  your local copy with the repository
  \item \texttt{git status}: to check which files/folders have been changed
  \item \texttt{git gui}: graphical user interface, helps selecting changes for
  a commit
\end{itemize}


\subsection{Gnuplot}
\label{gnuplot}
A gnuplot interface is available to plot or visualize results during a simulation run.
This is achieved with the help of the \texttt{Dumux::GnuplotInterface} class provided in \texttt{io/gnuplotinterface.hh}.

To use the gnuplot interface you have to make some modifications in your file, e.g., your main file.

First, you have to include the corresponding header file for the gnuplot interface.
\begin{lstlisting}[style=DumuxCode]
#include <dumux/io/gnuplotinterface.hh
\end{lstlisting}

Second, you have to define an instance of the class \texttt{Dumux::GnuplotInterface} (e.g. called \texttt{gnuplot}).
\begin{lstlisting}[style=DumuxCode]
Dumux::GnuplotInterface<double> gnuplot;
\end{lstlisting}

As an example, to plot the mole fraction of nitrogen (\texttt{y}) over time (\texttt{x}),
extract the variables after each time step in the time loop.
The actual plotting is done using the method of the gnuplot interface:

\begin{lstlisting}[style=DumuxCode]
gnuplot.resetPlot();                             // reset the plot
gnuplot.setXRange(0.0, 72000.0);                 // specify xmin and xmax
gnuplot.setYRange(0.0, 1.0);                     // specify ymin and ymax
gnuplot.setXlabel("time [s]");                   // set xlabel
gnuplot.setYlabel("mole fraction mol/mol");  // set ylabel

// set x-values, y-values, the name of the data file and the Gnuplot options
gnuplot.addDataSetToPlot(x, y, "N2.dat", options);

gnuplot.plot("mole_fraction_N2");                // set the name of the output file
\end{lstlisting}

It is also possible to add several data sets to one plot by calling \texttt{addDataSetToPlot()} more than once.
For more information have a look into a test including the gnuplot interface header file, the doxygen documentation
of \texttt{Dumux::GnuplotInterface}, or the header file itself (\texttt{dumux/io/gnuplotinterface.hh}).


\subsection{Gstat}
Gstat is an open source software tool which generates geostatistical random fields (see \url{www.gstat.org}).
In order to use gstat, execute the \texttt{bin/installexternal.sh} from your \Dumux root
directory or donwload, unpack and install the tarball from the gstat-website.
Then rerun cmake (in the second case set \texttt{GSTAT\_ROOT} in your input file to the
path where gstat is installed).


\subsection{ParaView}
\paragraph{Reload Button:}
There are scripts to reload PVD or series of VTU files since ParaView 4.2.
The scripts can be found
\href{http://markmail.org/message/exxynsgishbvtngg#query:+page:1+mid:rxlwxs7uqrfgibyv+state:results}{\texttt{under this link}}.
Just save the specific code portion in a file and load it via \texttt{Macros} $\rightarrow$ \texttt{Add new macro}.

\paragraph{Guide:}
Since ParaView 4.3.1, The ParaView Guide is partly
available for free download, see \url{http://www.paraview.org/documentation/}.
It contains similar content as the ParaView book.
