Commit 9d0e9582 authored by Olga Glogowska's avatar Olga Glogowska
Browse files

edited: Chapter 2: rearangement of subsections, initial description of...

edited: Chapter 2: rearangement of subsections, initial description of demonstrators and workflow, some TODOs to be discussed
parent 04ade514
\section{High-level overview of \exahype\ workflow}
\exahype\ is designed in such a way that most of the implementation details are hidden away from the user in the heart of an engine, i.e. \texttt{ExaHyPE} directory. A connecting piece between the user defined application \texttt{UserApplication} and \texttt{ExaHyPE} engine is the \texttt{Toolkit} utility. \texttt{Toolkit} fulfils the purpose of the 'configure' step present in some tools and thus comes before the compilation. \texttt{Toolkit} is responsible for decoding of \textit{configuration file} and generating \textit{glue code} and \textit{make system} for your \exahype\ applications. The so called \textit{glue code} establishes all appropriate connections between \texttt{UserApplication} and \texttt{ExaHyPE} intrinsics to make sure \texttt{UserApplication} can run smoothly. Among files generated by the \texttt{Toolkit}, some are meant for you to interact with, i.e. you need to provide in these files your implementation of a system of PDEs to be solved. Once it is done, you are ready to compile the application using a \texttt{Makefile} generated by the \texttt{Toolkit}. This will result in an executable \texttt{ExaHyPE-UserApplication} appearing in your project's directory. At this point you can run your application from \texttt{UserApplication} directory by typing in \texttt{./ExaHyPE-UserApplication} and passing your \textit{configuration file} as an argument.In term of code, you can refer to a generic template shown in section below.\\
\begin{code}
> cd ExaHyPE-Engine
> ./Toolkit/toolkit.sh UserApplication/*.exahype
> cd UserApplication
> make
> ./ExaHyPE-UserApplication *.exahype
\end{code}
\vspace{0.3cm}
\noindent
The process has been additionally visualised in Figure \ref{fig:workflow}.
\vspace{0.5cm}
\begin{figure}[H]
\begin{center}
\includegraphics[width=.9\textwidth]{tikz/demonstrators-workflow.pdf}
\includegraphics[width=.9\textwidth]{tikz/demonstrators-legend.pdf}
\end{center}
\caption[Sketch (tikz): High-level overview of \exahype\ workflow]{High-level overview of \exahype\ workflow and files generated by the application. \label{fig:workflow}}
\end{figure}
\vfill
\subsection{Configuration file}
\todo[inline]{Make sure this description is more or less ok. What exactly is mexa and how to use its CLI? What is exa and how to use its CLI to translate the files?}
Configuration file is a centrepiece of the \textit{workflow}. As mentioned, it is used for two purposes:
\begin{enumerate}
\vspace{0.1cm}
\item to provide configuration for \texttt{Toolkit} so that the correct context can be generated
\vspace{0.1cm}
\item to provide specification to \texttt{ExaHyPE-YourApplication} executable at runtime
\end{enumerate}
\vspace{0.3cm}
\noindent
For now it should not be any reason to worry, but it is a good place to mention, that for the user's convenience, \exahype\ supports multiple configuration file formats, such as:
\begin{enumerate}
\vspace{0.1cm}
\item \textbf{\texttt{*.exahype}}\\
\textit{legacy specification file format}
\vspace{0.1cm}
\item \textbf{\texttt{*.json / *.exahype2}}\\
\textit{recommended new specification file format}
\vspace{0.1cm}
\item \textbf{\texttt{*.hjson}}\\
\textit{more human friendly \texttt{*.json} equivalent}
\vspace{0.1cm}
\item \textbf{\texttt{*.mexa / *.mexahype}}\\
\textit{\exahype\ specific configuration file language utility}
\vspace{0.1cm}
\item \textbf{\texttt{*.yml}}\\
\textit{support will be provided, currently work in progress}
\end{enumerate}
\vspace{0.3cm}
\noindent
For each of the configuration file formats, \texttt{Toolkit} provides a separate \textit{reader}, which interprets the syntax and returns a data structure in the form of a dictionary or a list. In the new version of the \texttt{Toolkit}, this structure is subsequently validated against a defined JSON-Schema and enriched with default values from the schema, if needed.\\
\noindent
When coming into contact with a new programme, users often need to familiarise themselves with an application specific syntax for writing configuration files, which makes the learning curve steeper. However, there also exist some well established configuration file languages, which are commonly used across many \textit{open source} projects. By providing support for both flavours, \exahype\ specific configuration file syntax as well as other known configuration file formats, \exahype\ hopes to flatten the learning curve for new users. Please do not hesitate to choose and use the configuration file language, which best suits your knowledge and/or needs.
\begin{info}
\small For more details regarding the \textit{legacy} configuration file format \texttt{*.exahype}, users can refer to provided jinja template. It can be found under the following path: \texttt{ExaHyPE-Engine/Toolkit/exahype/} \texttt{specfiles/templates/} \texttt{specfile1.exahype.template}.
\end{info}
\begin{info}
\small The \textit{recommended} configuration file format for the new version of the \texttt{Toolkit} is \texttt{*.json} or otherwise called \texttt{*.exahype2} configuration file format. To familiarise yourself with its syntax, users can have a look at a provided \textit{json} schema. It can be found under the following path: \texttt{ExaHyPE-Engine/} \texttt{Toolkit/exahype-specfile.schema.json}.
\end{info}
\begin{info}
\small To get an idea about how to write configuration files using \texttt{*.mexa} format, visit: \url{http://bitbucket.org/svek/mexa}. Some examples are also to be found in \texttt{ApplicationExamples} directory of \exahype.
\label{note:mexa}
\end{info}
\noindent
Due to abundance of configuration file formats supported, \exahype\ also provides a means of translating between them. In particular, all \textit{legacy} configuration files with extension \texttt{*.exahype} can be converted into \texttt{*.exahype2} format using the \texttt{specfile1\_reader.py} module. In order to translate your \textit{legacy} file into the \textit{new recommended} format, you can run \texttt{specfile1\_reader.py} as a \texttt{\_\_main\_\_} module with the following command line arguments:
\begin{code}
> cd ExaHyPE-Engine/Toolkit/exahype/specfiles
> python3 specfile1_reader.py [exahype] [exahype2]
\end{code}
where \texttt{[exahype]} and \texttt{[exahype2]} are the paths to desired input and output configuration files respectively.\\
\noindent
Using the \texttt{mexa.py} module and provided \textit{command line interface}, you can also translate your \texttt{*.mexa} configuration files to \texttt{*.exahype}, \texttt{*.json}, \texttt{*.hjson} and \texttt{*.xml}. More about that under the \textit{url} indicated in Note \ref{note:mexa}.
\section{Minimalistic Finite Volumes for the Euler equations}
\section{Minimalistic \exahype\ solvers for the Euler equations}
As an introduction into \exahype\ workflow, we provide a complete implementation of an Euler solver based on all three of \exahype's native finite volume and finite element solvers, i.e.:
\begin{enumerate}
\item finite volume solver
\item ADER-DG solver without limiting
\item ADER-DG solver with finite volumes limiting
\end{enumerate}
We provide a complete Finite Volume implementation of a plain Euler solver
realised with \exahype.
This solver relies on a Rusanov flux and can, with only a few lines, be
changed into an ADER-DG scheme later.
Indeed, it can be used by an ADER-DG scheme as a limiter.
You find the \texttt{EulerFV} in the
\texttt{Demonstrators} subdirectory.
\subsection{Preparation}
\noindent
Finite Volume solver is the simplest one. In its basic version, it relies on a Rusanov flux. With only a few lines, it can be
changed into an ADER-DG-without-limiting scheme later. It can also be used by an ADER-DG scheme as a limiter. You can find all of these
basic implementations in the \texttt{Demonstrators} subdirectory of \texttt{ExaHyPE-Engine}. For simplicity, all demonstrators are based on \texttt{*.exahype} configuration files.\\
In the following we provide an extensive description of how to run your first application based on \textit{Demonstrators/EulerFV} demonstrator.
The demonstrator folder contains solely files modified to realise the solver.
All glue code are to be generated with the toolkit.
Before we do so, we open the file \texttt{EulerFV.exahype}.
This simple text file is the centerpiece of our solver.
\subsection{Finite Volume Solver}
\todo[inline]{Why can I not open *.vtu files in Paraview for steps later than 1?}
\noindent
The demonstrator folder \texttt{Demonstrators/EulerFV} contains solely files modified to realise the finite volume solver.
All \textit{glue code} are to be generated with the \texttt{Toolkit}.
Before you do so, open \texttt{EulerFV.exahype} configuration file.
This simple text file is the of the solver.
It specifies the solver properties, the numerical schemes, and it also holds all
the mandatory paths:
\begin{code}
......@@ -50,20 +55,38 @@ exahype-project EulerFV
end exahype-project
\end{code}
\noindent
To prepare this example for the simulation, we have to generate all glue code
To prepare this example for the simulation, you have to generate all the glue code with the \texttt{Toolkit}. In order to do that, change into the main \exahype\ directory and run the \texttt{Toolkit} as follows:
\begin{code}
> ./Toolkit/toolkit.sh \
Demonstrators/EulerFV/EulerFV.exahype
> cd ExaHyPE-Engine
> ./Toolkit/toolkit.sh Demonstrators/EulerFV/EulerFV.exahype
\end{code}
\noindent
and afterwards change into the application's directory
(\texttt{Demonstrators/EulerFV}) and type in \texttt{make}.
If the context generation is successful, you will not receive any output or confirmation. In that case, just change into the application's directory \texttt{Demonstrators/EulerFV}:
\begin{code}
> cd Demonstators/EulerFV
\end{code}
Now you should see all the files that have been created by the \texttt{Toolkit} as shown in Figure \ref{fig:demonstrators-EulerFV}. Colour legend is equivalent to the one presented in Figure{fig:demonstrators-workflow} showing a gneral overview of \exahype\-specific workflow. As you can see, the \texttt{Toolkit} is smart enough not to overwrite the files that have already been provided in the \texttt{Demonstrator/EulerFV}, as these are the files that contain the implementation of application specific system of PDEs, initial conditions, etc.
\begin{figure}
\centering
\includegraphics[width=.9\textwidth]{tikz/demonstrators-EulerFV.pdf}
\caption[Sketch (tikz): Files generated by the Toolkit]{Structure of the files for \texttt{EulerFV} demonstrator \label{fig:demonstrators-EulerFV}}
\end{figure}
\begin{design}
Most modifications to the specification file do not require you
to rerun the \exahype\ toolkit.
A rerun is only required for changes to parameters
with a trailing \texttt{const}, if you change the number or type
of solvers, or if you change the number of plotters in the specification
file.
\end{design}
Now, you are ready for the next step, i.e. compilation of your programme. In order to do that, type in the following:
\begin{code}
> make -j4
\end{code}
The flag \texttt{-j} with \texttt{n} being the number of threads can speed up the compilation.
Depending on your system, you might have to set/change some environment
variables or adopt pathes, but both the toolkit and the makefile are very
variables or adopt paths, but both the toolkit and the makefile are very
chatty.
For the present demonstrator, it is usually sufficient to set either
\begin{code}
......@@ -73,55 +96,43 @@ or
\begin{code}
> export COMPILER=GNU
\end{code}
\noindent
In both modes, the makefile defaults to \texttt{icpc} or \texttt{g++},
respectively.
To change the compiler used, export the variable \texttt{CC} explicitly.
\begin{design}
Most modifications to the specification file do not require you
to rerun the {\exahype} toolkit.
A rerun is only required for changes to parameters
with a trailing \texttt{const}, if you change the number or type
of solvers, or if you change the number of plotters in the specification
file.
\end{design}
\subsection{Run}
Once the compile has been successful, you obtain an executable
\texttt{ExaHyPE-EulerFV} in your application-specific directory.
\exahype's specification files always act as both specification and
configuration file, so you start up the code by handling it over the spec file
In case anything goes wrong and compilation does not work, although you have fixed the errors reported, you might need to run
\begin{code}
> make clean
\end{code}
This will clean up after previous unsuccessful compilation attempt and remove all trash files.
Once the compile has been successful, as shown in Figure \ref{fig:demonstrators-EulerFV}, you obtain in your application's directory, among other files, also an executable
\texttt{ExaHyPE-EulerFV}.\exahype's configuration files always act as both specification and
configuration file, so you start up the code by handing over the same \texttt{*.exahype} file to it
again:
\begin{code}
> ./ExaHyPE-EulerFV ./EulerFV.exahype
\end{code}
\noindent
A successful run yields a \texttt{*.pvd} file that you can open with
A successful run yields a bunch of \texttt{*.vtu} files that you can open for example with
Paraview\footnote{\url{www.paraview.org}} or
VisIt\footnote{\url{wci.llnl.gov/simulation/computer-codes/visit}},
e.g.
There are two quantites plotted:
The time encodes per vertex and quantity at which time step the data has been
written.
VisIt\footnote{\url{wci.llnl.gov/simulation/computer-codes/visit}}.\\
\todo[inline]{Is $t$ parameter described correctly?}
\noindent
There are two quantites plotted:
\begin{enumerate}
\item The time encodes $t$ per vertex. Quantity $t$ is referring to a time step at which the data has been written to a vertex
For these primitive tests with global time stepping, this information is of
limited value.
It however later makes a big difference if parts of the grid are allowed to
limited value. It however later makes a big difference if parts of the grid are allowed to
advance in time asynchronous to other grid parts.
The second quantity $Q$ is a vector of the real unknowns.
\item The second quantity $Q$ is a vector of the real unknowns.
The underlying semantics of the unknowns is detailed in Section
\ref{chapter:new-development-project}.
For the time being, you may want to select first entry which is the density or
the last quantity representing the energy. The plot should look similar
\ref{chapter:aderdg-user-defined-fluxes}.
For the time being, you may want to select first entry $Q[1]$ which is the density or
the last quantity $Q[4]$ representing the energy. The plot should look similar
to Figure \ref{fig:02fvm-snapshots}.
Please note that this minimalistic \exahype\ application will yield some
errors/warnings that no \texttt{exahype.log-filter} file has been found and thus
\end{enumerate}
\noindent
Please note that this minimalistic \exahype\ application will yield some warnings that no \texttt{exahype.} \texttt{log-filter} file has been found and thus
no filter is applied on the output messages.
You will obtain tons of messages.
The tailoring of the log outputs towards your needs is subject of discussion in
......@@ -130,8 +141,7 @@ For the present experiment, you should be fine without diving into these
details.
\newpage
\begin{figure}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.36\textwidth]{screenshots/02_FVM_00.png}
\includegraphics[width=0.36\textwidth]{screenshots/02_FVM_01.png}
......@@ -148,4 +158,46 @@ details.
\caption[Paraview snapshots: Euler Demonstrator Logo flow]{Snapshots of the time evolution of $Q_4$, ie. the energy distribution
in the EulerFlow Finite Volume demonstrator code.}%
\label{fig:02fvm-snapshots}
\end{figure}
\newpage
\subsection{ADER-DG Solver without limiting}
For ADER-DG solvers, the procedure is practically the same as for Finite Volume solvers. Thus we only provide an overview of files generated in this example - highlighting the role of each of these in the \exahype\ workflow. Please refer to Figure \ref{fig:demonstrators-EulerADERDG-without-limiting}. You are encouraged to explore the content of these files on your own. Some general remarks on Finite Volume and ADER-DG solver can be found in Chapter \ref{chapter:aderdg-user-defined-fluxes}. Further, detailed description regarding ADER-DG solver, though based on Shallow Water Equations (SWE) case, is provided in Chapter \ref{chapter:swe}.
\begin{code}
> cd ExaHyPE-Engine
> ./Toolkit/toolkit.sh Demonstrators/EulerADERDG-without-limiter/
EulerADERDG-without-limiter.exahype
> cd Demonstrators/EulerADERDG-without-limiter
> make -j8
>./ExaHyPE-EulerADERDG EulerADERDG-without-limiter.exahype
\end{code}
\subsection{ADER-DG Solver with finite volumes limiting}
\todo[inline]{ Is this the right way to run this example?\\
1) vertices plotter does not work so needs to be commented out for it to run\\
2) if commented out and only subcellplotter used, there is no *.vtk output}
\noindent
For ADER-DG solvers with limiting, the procedure is somewhat different. Please refer to Chapter \ref{chapter:coupling-limiter} for more detailed description of how to couple Finite Volume Limiter with ADER-DG solver. Analysing provided overview of files generated for this example can give some hints. Please refer to Figure \ref{fig:demonstrators-EulerADERDG}. You are encouraged to explore the content of these files on your own.
\begin{code}
> cd ExaHyPE-Engine
> ./Toolkit/toolkit.sh Demonstrators/EulerADERDG/EulerADERDG.exahype
> cd Demonstrators/EulerADERDG
> make -j4
>./ExaHyPE-EulerADERDG EulerADERDG.exahype
\end{code}
\newpage
\begin{figure}
\begin{center}
\includegraphics[width=.9\textwidth]{tikz/demonstrators-EulerADERDG-without-limiting.pdf}
\end{center}
\caption[Sketch (tikz): Files generated by the Toolkit]{Structure of the fiiles for \texttt{EulerADERDG-without-limiting} demonstrator} \label{fig:demonstrators-EulerADERDG-without-limiting}
\end{figure}
\newpage
\begin{figure}
\begin{center}
\includegraphics[width=.9\textwidth]{tikz/demonstrators-EulerADERDG.pdf}
\end{center}
\caption[Sketch (tikz): Files generated by the Toolkit]{Structure of the fiiles for \texttt{EulerADERDG} demonstrator} \label{fig:demonstrators-EulerADERDG}
\end{figure}
\ No newline at end of file
......@@ -29,6 +29,7 @@
\usepackage{etoolbox} % list of figures etc.
\usepackage{subfig}
\usepackage{verbatim}
\usepackage{float}
% Todo notes. You can disable them by enabling this line:
%\def\releasemode{1}
......@@ -134,8 +135,9 @@ This particular document was generated on \today\ at \currenttime. \\
\input{02_demonstrators}
\pagebreak
\input{02b_Euler-FiniteVolumes.tex}
\input{03_documentation.tex}
\input{02a_Demonstrators-Workflow}
\input{02b_Euler-FiniteVolumes}
\input{03_documentation}
%removed for now since this structure is no longer correct
%\input{04_development-process}
......
\documentclass[12pt, tikz]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8x]{inputenc}
\usepackage{mathptmx}
\usepackage{helvet}
\usepackage{amsmath}
\usepackage{subfloat}
\usepackage{tikz}
\usetikzlibrary{arrows,snakes}
\usetikzlibrary{fit}
\usepackage{tikz-layers}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\newlength{\imagewidth}
\newlength{\imagescale}
\pagestyle{empty}
\thispagestyle{empty}
\makeatletter
\pgfdeclareshape{document}{
\inheritsavedanchors[from=rectangle] % this is nearly a rectangle
\inheritanchorborder[from=rectangle]
\inheritanchor[from=rectangle]{center}
\inheritanchor[from=rectangle]{north}
\inheritanchor[from=rectangle]{south}
\inheritanchor[from=rectangle]{west}
\inheritanchor[from=rectangle]{east}
% ... and possibly more
\backgroundpath{% this is new
% store lower right in xa/ya and upper right in xb/yb
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
% compute corner of ‘‘flipped page’’
\pgf@xc=\pgf@xb \advance\pgf@xc by-10pt % this should be a parameter
\pgf@yc=\pgf@yb \advance\pgf@yc by-10pt
% construct main path
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
\pgfpathclose
% add little corner
\pgfpathmoveto{\pgfpoint{\pgf@xc}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}}
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}}
}
}
\makeatother
\definecolor{limegreen}{rgb}{0.2, 0.8, 0.2}
\def\leftpos{-5.5}
\def\rightpos{5.5}
\def\startverticalposition{-2.5}
\def\verticalspace{1.6}
\begin{document}
\centering
\tikzstyle{root}=[rectangle,draw=gray!50,fill=gray!20,thick, minimum width=4.75cm, minimum height = 1.3cm,rounded corners]
\tikzstyle{file}=[document,draw=gray!50,fill=gray!20,thick, minimum width=4.75cm, minimum height = 1.3cm]
\tikzstyle{OUT-TOOLKIT-USER}=[fill=cyan!20, rounded corners,fit= (outputNotBeingOverwritten top) (outputNotBeingOverwritten bottom)]
\tikzstyle{IN} =[fill=magenta!20, rounded corners,label=\color{magenta!80}{\textit{IN}},dashed,draw=black,rounded corners, fit= (input top)]
\tikzstyle{OUT-TOOLKIT}=[fill=cyan!5, rounded corners,label=\color{cyan!80}{\textit{OUT-TOOLKIT}},dashed,draw=black,rounded corners, fit= (outputNotBeingOverwritten top) (outputBeingOverwritten top) (outputBeingOverwritten bottom)]
\tikzstyle{OUT-MAKE}=[fill=limegreen!5, rounded corners,label=\color{limegreen!80}{\textit{OUT-MAKE}},dashed,draw=black,rounded corners, fit= (outputMake top right) (executable) (outputMake bottom left)]
\tikzstyle{OUT-MAKE-USER}=[fill=limegreen!20, rounded corners,rounded corners, fit= (executable)]
\tikzstyle{OTHER}=[fill=gray!5, rounded corners,label=\color{gray!80}{\textit{OTHER}},dashed,draw=black,rounded corners, fit= (other top) (other bottom)]
\tikzstyle{RESULTS}=[fill=orange!5, rounded corners,label=\color{orange!80}{\textit{RESULTS}},dashed,draw=black,rounded corners, fit= (results top) (results bottom)]
\tikzstyle{BACKGROUND}=[fill=gray!5, rounded corners, fit= (root) (outputBeingOverwritten bottom) (input top) (outputNotBeingOverwritten top) (other bottom) (outputMake bottom left)]
\begin{tikzpicture}
\begin{scope} [on glass layer]
\node at (0,0) [root] (root) {\begin{tabular}{c}EulerADERDG\\-without-limiter\end{tabular}};
%input files
\node at (\leftpos,\startverticalposition) [file] (input top) {\color{black!80}{\begin{tabular}{c}EulerADERDG-without \\-limiter.exahype \end{tabular}}};
%other files
\node at (\leftpos,\startverticalposition-2*\verticalspace) [file] (other top) {\color{black!80}{\begin{tabular}{c} EulerADERDG-without\\-limiter.readme \end{tabular}}};
\node at (\leftpos,\startverticalposition-3*\verticalspace) [file] (other bottom) {\color{black!80}{LogoExaHyPE.h}};
%out executable
\node at (\leftpos+0.1*\verticalspace, \startverticalposition-4.9*\verticalspace) (results top) [file] {};
\node at (\leftpos+0.05*\verticalspace, \startverticalposition-4.95*\verticalspace) [file] {};
\node at (\leftpos, \startverticalposition-5*\verticalspace) [file] {\color{black!80}{variables-0.vtk}};
\node at (\leftpos, \startverticalposition-6*\verticalspace) [file] (results bottom) {\color{black!80}{sharedmemory.properties}};
%output files from toolkit which will be overwritten
\node at (0,\startverticalposition) [file] (outputBeingOverwritten top) {\color{black!80}{\begin{tabular}{c}Abstract\\MyEulerSolver.h\end{tabular}}};
\node at (0,\startverticalposition-\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}Abstract\\MyEulerSolver.cpp\end{tabular}}};
\node at (0,\startverticalposition-2*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}MyEulerSolver\\ \_Variables.h\end{tabular}}};
\node at (0,\startverticalposition-3*\verticalspace) [file] {\color{black!80}{KernelCalls.cpp}};
\node at (0,\startverticalposition-4*\verticalspace) [file] {\color{black!80}{Makefile}};
\node at (0,\startverticalposition-5*\verticalspace) [file] (outputBeingOverwritten bottom) {\color{black!80}{README\_generated.md}};
%output files from toolkit which will not be overwritten
\node at (\rightpos,\startverticalposition) [file](outputNotBeingOverwritten top) {\color{black!80}{MyEulerSolver.h}};
\node at (\rightpos,\startverticalposition-\verticalspace) [file] {\color{black!80}{MyEulerSolver.cpp}};
\node at (\rightpos,\startverticalposition-2*\verticalspace) [file] {\color{black!80}{EulerWriter.h}};
\node at (\rightpos,\startverticalposition-3*\verticalspace) [file] (outputNotBeingOverwritten bottom) {\color{black!80}{EulerWriter.cpp}};
%output files from make system
\node at (\leftpos,\startverticalposition-7.75*\verticalspace) [file] {\color{black!80}{AbstractMyEulerSolver.o}};
\node at (\leftpos,\startverticalposition-8.75*\verticalspace) [file] {\color{black!80}{MyEulerSolver.o}};
\node at (\leftpos,\startverticalposition-9.75*\verticalspace) [file] {\color{black!80}{EulerWriter.o}};
\node at (\leftpos,\startverticalposition-10.75*\verticalspace) [file] (outputMake bottom left){\color{black!80}{KernelCalls.o}};
\node at (0,\startverticalposition-7.75*\verticalspace) [file] {\color{black!80}{buildinfo.h}};
\node at (0,\startverticalposition-8.75*\verticalspace) [file] {\color{black!80}{cfiles.mk}};
\node at (0,\startverticalposition-9.75*\verticalspace) [file] {\color{black!80}{cipofiles.mk}};
\node at (0,\startverticalposition-10.75*\verticalspace) [file] {\color{black!80}{ffiles.mk}};
\node at (\rightpos,\startverticalposition-7.75*\verticalspace) [file] (outputMake top right) {\color{black!80}{variables.pvd}};
%output file from make system --> executable
\node at (\rightpos,\startverticalposition-8.75*\verticalspace) [file] (executable) {\color{black!80}{ExaHyPE-EulerFV}};
\end{scope}
\begin{scope}[on above layer]
\node [OUT-TOOLKIT] {};
\node [OUT-TOOLKIT-USER] {};
\node [OUT-MAKE] {};
\node [OUT-MAKE-USER] {};
\node [RESULTS] {};
\end{scope}
\begin{scope}[on behind layer]
\node [IN] {};
\node [OTHER] {};
\end{scope}
\begin{scope}[on background layer]
\node [BACKGROUND] {};
\end{scope}
\end{tikzpicture}
\end{document}
\documentclass[12pt, tikz]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8x]{inputenc}
\usepackage{mathptmx}
\usepackage{helvet}
\usepackage{amsmath}
\usepackage{subfloat}
\usepackage{tikz}
\usetikzlibrary{arrows,snakes}
\usetikzlibrary{fit}
\usepackage{tikz-layers}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\newlength{\imagewidth}
\newlength{\imagescale}
\pagestyle{empty}
\thispagestyle{empty}
\makeatletter
\pgfdeclareshape{document}{
\inheritsavedanchors[from=rectangle] % this is nearly a rectangle
\inheritanchorborder[from=rectangle]
\inheritanchor[from=rectangle]{center}
\inheritanchor[from=rectangle]{north}
\inheritanchor[from=rectangle]{south}
\inheritanchor[from=rectangle]{west}
\inheritanchor[from=rectangle]{east}
% ... and possibly more
\backgroundpath{% this is new
% store lower right in xa/ya and upper right in xb/yb
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
% compute corner of ‘‘flipped page’’
\pgf@xc=\pgf@xb \advance\pgf@xc by-10pt % this should be a parameter
\pgf@yc=\pgf@yb \advance\pgf@yc by-10pt
% construct main path
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
\pgfpathclose
% add little corner
\pgfpathmoveto{\pgfpoint{\pgf@xc}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}}
\pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}}
}
}
\makeatother
\definecolor{limegreen}{rgb}{0.2, 0.8, 0.2}
\def\leftpos{-5.5}
\def\rightpos{5.5}
\def\startverticalposition{-2.5}
\def\verticalspace{1.6}
\begin{document}
\centering
\tikzstyle{root}=[rectangle,draw=gray!50,fill=gray!20,thick, minimum width=4.75cm, minimum height = 1.3cm,rounded corners]
\tikzstyle{file}=[document,draw=gray!50,fill=gray!20,thick, minimum width=4.75cm, minimum height = 1.3cm]
\tikzstyle{OUT-TOOLKIT-USER}=[fill=cyan!20, rounded corners,fit= (outputNotBeingOverwritten top) (outputNotBeingOverwritten bottom)]
\tikzstyle{IN} =[fill=magenta!20, rounded corners,label=\color{magenta!80}{\textit{IN}},dashed,draw=black,rounded corners, fit= (input top)]
\tikzstyle{OUT-TOOLKIT}=[fill=cyan!5, rounded corners,label=\color{cyan!80}{\textit{OUT-TOOLKIT}},dashed,draw=black,rounded corners, fit= (outputNotBeingOverwritten top) (outputBeingOverwritten top) (outputBeingOverwritten bottom) (outputBeingOverwritten other column)]
\tikzstyle{OUT-MAKE}=[fill=limegreen!5, rounded corners,label=\color{limegreen!80}{\textit{OUT-MAKE}},dashed,draw=black,rounded corners, fit= (outputMake top right) (executable) (outputMake bottom left)]
\tikzstyle{OUT-MAKE-USER}=[fill=limegreen!20, rounded corners,rounded corners, fit= (executable)]
\tikzstyle{OTHER}=[fill=gray!5, rounded corners,label=\color{gray!80}{\textit{OTHER}},dashed,draw=black,rounded corners, fit= (other top) (other bottom)]
\tikzstyle{RESULTS}=[fill=orange!5, rounded corners,label=\color{orange!80}{\textit{RESULTS}},dashed,draw=black,rounded corners, fit= (results top) (results bottom)]
\tikzstyle{BACKGROUND}=[fill=gray!5, rounded corners, fit= (root) (outputBeingOverwritten bottom) (input top) (outputNotBeingOverwritten top) (other bottom) (outputMake bottom left)]
\begin{tikzpicture}
\begin{scope} [on glass layer]
\node at (0,0) [root] (root) {EulerADERDG};
%input files
\node at (\leftpos,\startverticalposition) [file] (input top) {\color{black!80}{EulerADERDG.exahype}};
%other files
\node at (\leftpos,\startverticalposition-2*\verticalspace) [file] (other top) {\color{black!80}{EulerADERDG.readme}};
\node at (\leftpos,\startverticalposition-3*\verticalspace) [file] {\color{black!80}{LogoExaHyPE.h}};
\node at (\leftpos,\startverticalposition-4*\verticalspace) [file] (other bottom) {\color{black!80}{LogoDurhamUniversity.h}};
%out executable
\node at (\leftpos+0.1*\verticalspace, \startverticalposition-5.9*\verticalspace) (results top) [file] {};
\node at (\leftpos+0.05*\verticalspace, \startverticalposition-5.95*\verticalspace) [file] {};
\node at (\leftpos, \startverticalposition-6*\verticalspace) [file] {\color{black!80}{variables-0.vtk}};
\node at (\leftpos, \startverticalposition-7*\verticalspace) [file] (results bottom) {\color{black!80}{sharedmemory.properties}};
%out from toolkit which will be overwritten
\node at (0,\startverticalposition) [file] (outputBeingOverwritten top) {\color{black!80}{\begin{tabular}{c}AbstractMyEulerSolver \\ \_ADERDG.h \end{tabular}}};
\node at (0,\startverticalposition-\verticalspace) [file] (outputBeingOverwritten top) {\color{black!80}{\begin{tabular}{c}AbstractMyEulerSolver \\ \_ADERDG.cpp \end{tabular}}};
\node at (0,\startverticalposition-2*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}MyEulerSolver \\ \_ADERDG\_Variables.h \end{tabular}}};
\node at (0,\startverticalposition-3*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}AbstractMyEulerSolver \\ \_FV.h \end{tabular}}};
\node at (0,\startverticalposition-4*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}AbstractMyEulerSolver \\ \_FV.cpp \end{tabular}}};
\node at (0,\startverticalposition-5*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}MyEulerSolver \\ \_FV\_Variables.h \end{tabular}}};
\node at (0,\startverticalposition-6*\verticalspace) [file] {\color{black!80}{MyEulerSolver.h}};
\node at (0,\startverticalposition-7*\verticalspace) [file] {\color{black!80}{MyEulerSolver.cpp}};
\node at (0,\startverticalposition-8*\verticalspace) [file] {\color{black!80}{KernelCalls.cpp}};
\node at (0,\startverticalposition-9*\verticalspace) [file] (outputBeingOverwritten bottom) {\color{black!80}{Makefile}};
\node at (\rightpos,\startverticalposition) [file] (outputBeingOverwritten other column) {\color{black!80}{README\_generated.md}};
%out from toolkit which will not be overwritten
\node at (\rightpos,\startverticalposition-\verticalspace) [file](outputNotBeingOverwritten top) {\color{black!80}{\begin{tabular}{c}MyEulerSolver \\ \_ADERDG.h \end{tabular}}};
\node at (\rightpos,\startverticalposition-2*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}MyEulerSolver \\ \_ADERDG.cpp \end{tabular} }};
\node at (\rightpos,\startverticalposition-3*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}MyEulerSolver \\ \_FV.h \end{tabular}}};
\node at (\rightpos,\startverticalposition-4*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}MyEulerSolver \\ \_FV.cpp \end{tabular}}};
\node at (\rightpos,\startverticalposition-5*\verticalspace) [file] {\color{black!80}{EulerWriter.h}};
\node at (\rightpos,\startverticalposition-6*\verticalspace) [file] {\color{black!80}{EulerWriter.cpp}};
\node at (\rightpos,\startverticalposition-7*\verticalspace) [file] {\color{black!80}{EulerSubcellWriter.h}};
\node at (\rightpos,\startverticalposition-8*\verticalspace) [file] (outputNotBeingOverwritten bottom) {\color{black!80}{EulerSubcellWriter.cpp}};
%output files from make system
\node at (\leftpos,\startverticalposition-10.75*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}AbstractMyEulerSolver \\ \_ADERDG.o \end{tabular}}};
\node at (\leftpos,\startverticalposition-11.75*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}AbstractMyEulerSolver \\ \_FV.o \end{tabular}}};
\node at (\leftpos,\startverticalposition-12.75*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}MyEulerSolver \\ \_ADERDG.o \end{tabular}}};
\node at (\leftpos,\startverticalposition-13.75*\verticalspace) [file] {\color{black!80}{\begin{tabular}{c}MyEulerSolver \\ \_FV.o \end{tabular}}};
\node at (\leftpos,\startverticalposition-14.75*\verticalspace) [file] (outputMake bottom left) {\color{black!80}{MyEulerSolver.o}};
\node at (0,\startverticalposition-10.75*\verticalspace) [file] {\color{black!80}{EulerWriter.o}};
\node at (0,\startverticalposition-11.75*\verticalspace) [file] {\color{black!80}{EulerSubcellsWriter.o}};
\node at (0,\startverticalposition-12.75*\verticalspace) [file] {\color{black!80}{KernelCalls.o}};
\node at (0,\startverticalposition-13.75*\verticalspace) [file] {\color{black!80}{buildinfo.h}};
\node at (0,\startverticalposition-14.75*\verticalspace) [file] {\color{black!80}{cfiles.mk}};
\node at (\rightpos,\startverticalposition-10.75*\verticalspace) (outputMake top right) [file] {\color{black!80}{cipofiles.mk}};
\node at (\rightpos,\startverticalposition-11.75*\verticalspace) [file] {\color{black!80}{ffiles.mk}};
\node at (\rightpos,\startverticalposition-12.75*\verticalspace) [file] {\color{black!80}{sharedmemory.properties}};
%output file from make system --> executable
\node at (\rightpos,\startverticalposition-13.75*\verticalspace) [file] (executable) {\color{black!80}{ExaHyPE-EulerFV}};
\end{scope}
\begin{scope}[on above layer]
\node [OUT-TOOLKIT] {};
\node [OUT-TOOLKIT-USER] {};
\node [OUT-MAKE] {};
\node [OUT-MAKE-USER] {};
\node [RESULTS] {};
\end{scope}
\begin{scope}[on behind layer]
\node [IN] {};
\node [OTHER] {};
\end{scope}
\begin{scope}[on background layer]
\node [BACKGROUND] {};
\end{scope}