|
METHOD
|
#include <simulation.h>

Public Member Functions | |
| Simulation (Data *data, PlatformEnv *env) | |
| virtual | ~Simulation () |
| void | set (InitialFunc *init, Model *model, TimeIntegrator *timeInt, Bcs *bcs, FluxMethod *fluxMethod, SaveData *save=NULL) |
| void | updateTime () |
| void | evolve (bool output=false, int safety=-1) |
Public Attributes | |
| Data * | data |
Private Attributes | |
| InitialFunc * | init |
| Model * | model |
| TimeIntegrator * | timeInt |
| Bcs * | bcs |
| FluxMethod * | fluxMethod |
| SaveData * | save |
| PlatformEnv * | env |
The Simulation interface for the programme
Definition at line 23 of file simulation.h.
| Simulation::Simulation | ( | Data * | data, |
| PlatformEnv * | env | ||
| ) |
Constructor.
| [in] | *data | pointer to Data class containing global simulation data |
|
virtual |
Destructor frees alloc'd memory.
| void Simulation::evolve | ( | bool | output = false, |
| int | safety = -1 |
||
| ) |
Run the current set up until the end time.
Before calling evolve(), the simulation must be set up using set() to ensure all data is current and consistent with the initial primitive variables that have been selected. Once the simulation is set, evolve() calls updateTime() until the simulation has reached its end point (providing no errors occur)
| [in] | output | boolean flag output files for animation |
| [in] | safety | number of frames after which to save all data. Defaults to -1 when option is switched off |
| void Simulation::set | ( | InitialFunc * | init, |
| Model * | model, | ||
| TimeIntegrator * | timeInt, | ||
| Bcs * | bcs, | ||
| FluxMethod * | fluxMethod, | ||
| SaveData * | save = NULL |
||
| ) |
Sets up the simulation ready to be evolved.
| [in] | *init | pointer to InitialFunc object |
| [in] | *model | pointer to Model object |
| [in] | *timeInt | pointer to TimeIntegrator object |
| [in] | *bcs | pointer to Bcs object |
| [in] | *fluxMethod | pointer to FluxMethod object |
| [in] | *save | pointer to the SaveData object |
| [in] | *env | pointer to the PlatformEnv object |
| void Simulation::updateTime | ( | ) |
Incrememt the system forward by a single timestep.
When calling updateTime(), all primitive and auxiliary variables must be set. I.e. they must correspond to the values of the conserved vector at that time step. Given this, the conserved variables are evolved using the given time integrator according to the selected model. All primitive and auxiliary variables are then found and the updated values are saved in the Data class.
|
private |
Pointer to boundary conditions, Bcs, object.
Definition at line 37 of file simulation.h.
| Data* Simulation::data |
Pointer to Data class containing global simulation data.
Definition at line 27 of file simulation.h.
|
private |
Pointer to PlatformEnv object.
Definition at line 43 of file simulation.h.
|
private |
Pointer to FluxMethod object.
Definition at line 39 of file simulation.h.
|
private |
Pointer to InitialFunc object to set up starting data.
Definition at line 31 of file simulation.h.
|
private |
Pointer to Model object, contains governing equations and spectral decomposition.
Definition at line 33 of file simulation.h.
|
private |
Pointer to SaveData object.
Definition at line 41 of file simulation.h.
|
private |
Pointer to TimeIntegrator object.
Definition at line 35 of file simulation.h.