Update Intro authored by ge68wax's avatar ge68wax
......@@ -74,9 +74,74 @@ u\textrm{, }u-\sqrt{g\cdot h}\textrm{ and } u+\sqrt{g\cdot h}
```
# Setting up the specification file
After the equation is defined we need to set up the specification file which for all applications carries the suffix \*.exahype. In the folder ApplicationExamples you can find a template *ADERDG_template.exahype* for an application that is solved by the ADER-DG method.
After the equation is defined we need to set up the specification file which for all applications carries the suffix \*.exahype. Start from the following template for an application that is solved by the ADER-DG method.
Set up a new directory *SWE* in ApplicationExamples and copy the template there and name it SWE_ADERDG.exahype.
```
exahype-project SWE
peano-kernel-path const = ./Peano
exahype-path const = ./ExaHyPE
output-directory const = ./ApplicationExamples/SWE_Test
architecture const = noarch
log-file = mylogfile.log
plotter-subdirectory const = Writers
/*Configure the domain*/
computational-domain
dimension const = 2
width = 1.0, 1.0
offset = 0.0, 0.0
end-time = 2.0
end computational-domain
/*Configure shared memory settings*/
/*shared-memory
identifier = dummy
configure = {background-tasks:8}
cores = 8
properties-file = sharedmemory.properties
end shared-memory*/
/*Optimiziation: DO N0T TOUCH*/
global-optimisation
fuse-algorithmic-steps = on
fuse-algorithmic-steps-factor = 0.99
spawn-predictor-as-background-thread = off
spawn-amr-background-threads = off
/* 0.0 und 0.8 sind schon mal zwei Faktoren */
disable-vertex-exchange-in-time-steps = on
time-step-batch-factor = 1.0
disable-metadata-exchange-in-batched-time-steps = on
double-compression = 0.0
spawn-double-compression-as-background-thread = off
end global-optimisation
/*Defines the hyperbolic PDE*/
solver ADER-DG ADERSolver
variables const = h:1,p:2
order const = 3
/* 27 points: 0.05, 9 points: 0.15 */
maximum-mesh-size = 0.3
time-stepping = globalfixed
type const = nonlinear
terms const = flux, ncp
optimisation const = generic
language const = C
/*##Add plotters here */
/*plot vtk::Cartesian::vertices::ascii VtkWriter
variables const = ##Number of variables to be plotted
time = ##Start time of the plotter
repeat = ##Plotting interval
output = ##File suffix
end plot */
end solver
end exahype-project
```
Set up a new directory *SWE_Test* in ApplicationExamples and copy the template there and name it SWE_ADERDG.exahype.
In this file all place holders are marked by ## and need to be filled to get a working application. (All other options are only used for optimizations and don't need to be touched or understood):
## `exahype-project`
* The name of the project. We use SWE.
......@@ -86,10 +151,10 @@ exahype-project SWE
```
## `output-directory const`
* Defines where the the code body will be generated relative to the root directory
* In our case we use *./ApplicationExamples/SWE/SWE_ADERDG*
* In our case we use *./ApplicationExamples/SWE_Test*
```javascript
output-directory const = ./ApplicationExamples/SWE/SWE_ADERDG
output-directory const = ./ApplicationExamples/SWE_Test
```
## `computational-domain`
......@@ -140,21 +205,20 @@ output-directory const = ./ApplicationExamples/SWE/SWE_ADERDG
output = ./swe
end plot
```
* This results in a writer plotting all 3 variables every 0.02 secons starting at time 0. The files will have a prefix swe and be placed in the project directory.
* This results in a writer plotting all 3 variables every 0.02 seconds starting at time 0. The files will have a prefix swe and be placed in the project directory.
# Run the Toolkit
To generate the code body apply the toolkit to the specification file we just created. Make sure that you ran the setUp.sh script in advance. Go back to the ExaHyPE root directory and hit :
```sh
./Toolkit/toolkit.sh ApplicationExamples/SWE/SWE_ADERDG.exahype
./Toolkit/toolkit.sh ApplicationExamples/SWE_Test/SWE_ADERDG.exahype
```
The Toolit will end with `setup build environment ... ok` if it terminated successful, else you'll receive a detailed error message.
Go back to ApplicationExamples/SWE/ you should see a new folder SWE_ADERDG which is the one we defined in `output-directory const`.
This folder should contain several automatically generated files:
Go back to ApplicationExamples/SWE_Test/ you should see several automatically generated files:
```sh
ls SWE_ADERDG
ls SWE_Test
> AbstractSWE_ADERDG.cpp AbstractSWE_ADERDG.h KernelCalls.cpp Makefile README_generated.md SWE_ADERDG.cpp SWE_ADERDG.h SWE_ADERDG_Variables.h VtkWriter.cpp VtkWriter.h
```
......@@ -292,7 +356,7 @@ make -j8
After compilation is finished run
```bash
./ExaHyPE_SWE ../SWE_ADER.exahype
./ExaHyPE_SWE SWE_ADER.exahype
```
You can look at the result files with Paraview.
\ No newline at end of file