Diagnostics interface and projected energy density
I added an abstract base class Diagnostics
. Any diagnostics inherits from it and has to implement the execute()
method, see for example ProjectedEnergyDensity
. After setting up the simulation, one has to call Simulation.executeDiagnostics()
to perform all diagnostics like e.g. calculate the projected energy density.
The main programm evolves a Gaussian pulse in time and writes the projected energy density to a file after every time step to analyse the evolution.
I also implemented a test to check if the total energy is preserved over time.