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.
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*
* 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 :