5_externaltools.tex 3.63 KB
 Thomas Fetzer committed Jul 27, 2015 1 2 3 4 \section{External Tools} \label{sc_externaltools} \subsection{Git}  Christoph Grüninger committed Jan 18, 2016 5 Git is a version control tool which we use.  Thomas Fetzer committed Jul 27, 2015 6 7 The basic Git commands are: \begin{itemize}  Beatrix Becker committed Dec 20, 2018 8 9 10 11  \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  Christoph Grüninger committed Jan 18, 2016 12  repository with your local copy  Beatrix Becker committed Dec 20, 2018 13  \item \texttt{git push}: push comitted changes to the repository; synchronizes  Christoph Grüninger committed Jan 18, 2016 14  your local copy with the repository  Beatrix Becker committed Dec 20, 2018 15 16  \item \texttt{git status}: to check which files/folders have been changed \item \texttt{git gui}: graphical user interface, helps selecting changes for  Christoph Grüninger committed Jan 18, 2016 17  a commit  Thomas Fetzer committed Jul 27, 2015 18 19 \end{itemize}  Thomas Fetzer committed May 25, 2016 20 21  \subsection{Gnuplot}  Utz committed Dec 18, 2018 22 \label{gnuplot}  Thomas Fetzer committed May 25, 2016 23 A gnuplot interface is available to plot or visualize results during a simulation run.  Timo Koch committed Dec 19, 2018 24 This is achieved with the help of the \texttt{Dumux::GnuplotInterface} class provided in \texttt{io/gnuplotinterface.hh}.  Utz committed Dec 18, 2018 25   Beatrix Becker committed Dec 18, 2018 26 To use the gnuplot interface you have to make some modifications in your file, e.g., your main file.  Utz committed Dec 18, 2018 27   Timo Koch committed Dec 19, 2018 28 First, you have to include the corresponding header file for the gnuplot interface.  Utz committed Dec 18, 2018 29 30 31 32 \begin{lstlisting}[style=DumuxCode] #include gnuplot;  Utz committed Dec 18, 2018 36 37 \end{lstlisting}  Beatrix Becker committed Dec 18, 2018 38 39 40 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:  Utz committed Dec 18, 2018 41 42  \begin{lstlisting}[style=DumuxCode]  Beatrix Becker committed Dec 18, 2018 43 gnuplot.resetPlot(); // reset the plot  Timo Koch committed Dec 19, 2018 44 gnuplot.setXRange(0.0, 72000.0); // specify xmin and xmax  Beatrix Becker committed Dec 18, 2018 45 46 47 gnuplot.setYRange(0.0, 1.0); // specify ymin and ymax gnuplot.setXlabel("time [s]"); // set xlabel gnuplot.setYlabel("mole fraction mol/mol"); // set ylabel  Utz committed Dec 18, 2018 48   Beatrix Becker committed Dec 18, 2018 49 // set x-values, y-values, the name of the data file and the Gnuplot options  Timo Koch committed Dec 19, 2018 50 gnuplot.addDataSetToPlot(x, y, "N2.dat", options);  Utz committed Dec 18, 2018 51   Beatrix Becker committed Dec 18, 2018 52 gnuplot.plot("mole_fraction_N2"); // set the name of the output file  Utz committed Dec 18, 2018 53 54 \end{lstlisting}  Beatrix Becker committed Dec 18, 2018 55 It is also possible to add several data sets to one plot by calling \texttt{addDataSetToPlot()} more than once.  Timo Koch committed Dec 19, 2018 56 57 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}).  Thomas Fetzer committed May 25, 2016 58 59 60 61 62 63  \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.  64 Then, rerun cmake (in the second case set \texttt{GSTAT\_ROOT} in your input file to the  Thomas Fetzer committed May 25, 2016 65 66 path where gstat is installed).  Thomas Fetzer committed Jul 27, 2015 67 68 69  \subsection{ParaView} \paragraph{Reload Button:}  Beatrix Becker committed Dec 20, 2018 70 There are scripts to reload PVD or series of VTU files since ParaView 4.2.  Thomas Fetzer committed Jul 27, 2015 71 The scripts can be found  Thomas Fetzer committed May 25, 2016 72 \href{http://markmail.org/message/exxynsgishbvtngg#query:+page:1+mid:rxlwxs7uqrfgibyv+state:results}{\texttt{under this link}}.  Thomas Fetzer committed Jul 27, 2015 73 74 75 Just save the specific code portion in a file and load it via \texttt{Macros} $\rightarrow$ \texttt{Add new macro}. \paragraph{Guide:}  Beatrix Becker committed Dec 20, 2018 76 Since ParaView 4.3.1, The ParaView Guide is partly  Thomas Fetzer committed Jul 27, 2015 77 available for free download, see \url{http://www.paraview.org/documentation/}.  Melanie Lipp committed Oct 08, 2019 78 It contains similar content as the ParaView book.