#include <SimulationCore.h>
Collaboration diagram for SimulationCore:
Public Member Functions | |
~SimulationCore () | |
Destructor. | |
void | exec () |
void | init () |
void | terminate () |
void | abort (string msg) |
GreenPlugin * | greenPlugin () |
LoadPlugin * | loadPlugin () |
DataOutPlugin * | dataOutPlugin () |
LoadHistoryPlugin * | loadHistoryPlugin () |
const char * | loadFile () |
const char * | outFile () |
const char * | observeFile () |
int | sizeX () |
int | sizeY () |
int | sizeT () |
int | gridSize () |
int | minX () |
int | minY () |
int | modelTime () |
int | stepSize () |
int | xIndex () |
int | yIndex () |
int | zIndex () |
int | getDimensions () |
int | displacementDimensions () |
double | constrainLoadHeight (double, int) |
int | getQuadrant () |
void | setQuadrant (int) |
void | setModelData (double **) |
double ** | getModelData () |
void | runExperimentManager () |
void | runPluginManager () |
PluginManager * | pluginManager () |
list< string > | getRegisteredParameters (PluginCategory cat) |
void | deleteRegistrees () |
list< string > | getRequestedNames () |
void | deleteRequests () |
green_exec_function | addGreenPlugin (string plugin) throw (FileNotFound, runtime_error) |
load_exec_function | addLoadPlugin (string plugin) throw (FileNotFound, runtime_error) |
run_function | addKernelPlugin (string plugin) throw (FileNotFound, runtime_error) |
run_function | addPostprocessorPlugin (string plugin) throw (FileNotFound, runtime_error) |
loadhistory_exec_function | addLoadHistoryPlugin (string plugin) throw (FileNotFound, runtime_error) |
void | registerOutputField (int *output_index, FieldName field) |
Static Public Member Functions | |
SimulationCore * | instance (int argc, char **argv) throw () |
SimulationCore * | instance () throw () |
Static Public Attributes | |
s_parameters | s_params = {} |
public struct keeping the command line arguments | |
Private Member Functions | |
SimulationCore (int argc, char **argv) throw (SeriousException) | |
hidden constructor, the SimulationCore shall be a singleton | |
SimulationCore (const SimulationCore &x) | |
hidden copy constructor - we do not want to accidentially copy objects | |
SimulationCore const & | operator= (SimulationCore const &rvalue) |
hidden assignment operator - we do not want to accidentially copy objects | |
Private Attributes | |
InputHandler * | com_port |
ExperimentManager * | exp_man |
PluginManager * | plugin_man |
Plugin * | pl_kernel |
DataOutPlugin * | pl_out |
GreenPlugin * | pl_green |
LoadPlugin * | pl_load |
LoadHistoryPlugin * | pl_history |
list< Plugin * > | pl_list_postprocessor |
int | x_west |
int | x_east |
int | y_south |
int | y_north |
int | gridsize |
int | modeltime |
int | num_timesteps |
int | stepsize |
int | quadrant |
int | dimensions |
int | x_index |
int | y_index |
int | z_index |
map< int *, int > | add_field_map |
double ** | model_data |
string | load_file |
string | obs_file |
list< Plugin * >::iterator | pl_iter |
list< Plugin * > | requested_plugin_list |
list< Plugin * > | pl_list_postprocess |
string | root_dir |
Static Private Attributes | |
SimulationCore * | pSimulationCore = 0 |
static Singleton initialisieren |
The SimulationCore is implemented following the Singleton Design Pattern, wich makes sure one and only one instance of the class SimulationCore will exist during an application run. This makes sense for various reasons. The most important is certainly that a SimulationCore is the application.
The main() function will get a pointer to this class by calling the instance(int, char**) function. Its main function is to build, init, run and terminate all parts of the application at the right time. The SimulationCore also keeps the simulation clock.
|
hidden constructor, the SimulationCore shall be a singleton
|
|
hidden copy constructor - we do not want to accidentially copy objects
|
|
Destructor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deletes all parameters of a specific category
|
|
|
|
|
|
go!go!go! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SimulationCore::instance returns the only existing instance |
|
SimulationCore::instance initializes singleton object in case it does not exist. returns the only existing instance |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hidden assignment operator - we do not want to accidentially copy objects
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hard-wired input handler, no plugin |
|
|
|
hard-wired experiment SimulationCore, no plugin |
|
|
|
|
|
|
|
the model time. an integer that is increased with each timestep |
|
maximum number of timesteps we want to simulate |
|
|
|
Green's Function plug in, one factor for convolution |
|
Load history function plugin in, used by pl_load, in case model time > 0 |
|
|
|
Plug-in instance taking care on the simulation kernel |
|
buffer for all the postprocessor plugins that might be loaded |
|
Postprocessor-Plugins, doing stuff with the model result |
|
Load function plug in, the second convolution factor |
|
Plug-in instance handling data output |
|
hard-wired plugin SimulationCore, no plugin ;) |
|
static Singleton initialisieren pointer to the only instance of SimulationCore |
|
|
|
buffer for all the plugins that will be loaded by other plugins. they only have to be kept in memory so the function pointer stay valid. but noone else will ever need to access them individually, only as a group to perform Plugin functions |
|
|
|
public struct keeping the command line arguments
|
|
time increment with each model step |
|
|
|
|
|
|
|
|
|
|
|
|
|
|