SimulationCore Class Reference

Singleton class SimulationCore. More...

#include <SimulationCore.h>

Collaboration diagram for SimulationCore:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ~SimulationCore ()
 Destructor.
void exec ()
void init ()
void terminate ()
void abort (string msg)
GreenPlugingreenPlugin ()
LoadPluginloadPlugin ()
DataOutPlugindataOutPlugin ()
LoadHistoryPluginloadHistoryPlugin ()
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 ()
PluginManagerpluginManager ()
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

SimulationCoreinstance (int argc, char **argv) throw ()
SimulationCoreinstance () 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

InputHandlercom_port
ExperimentManagerexp_man
PluginManagerplugin_man
Pluginpl_kernel
DataOutPluginpl_out
GreenPluginpl_green
LoadPluginpl_load
LoadHistoryPluginpl_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

SimulationCorepSimulationCore = 0
 static Singleton initialisieren

Detailed Description

Singleton class SimulationCore.

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.


Constructor & Destructor Documentation

SimulationCore::SimulationCore int  argc,
char **  argv
throw (SeriousException) [private]
 

hidden constructor, the SimulationCore shall be a singleton

SimulationCore::SimulationCore const SimulationCore x  )  [private]
 

hidden copy constructor - we do not want to accidentially copy objects

SimulationCore::~SimulationCore  ) 
 

Destructor.


Member Function Documentation

void SimulationCore::abort string  msg  ) 
 

green_exec_function SimulationCore::addGreenPlugin string  plugin  )  throw (FileNotFound, runtime_error)
 

run_function SimulationCore::addKernelPlugin string  plugin  )  throw (FileNotFound, runtime_error)
 

loadhistory_exec_function SimulationCore::addLoadHistoryPlugin string  plugin  )  throw (FileNotFound, runtime_error)
 

load_exec_function SimulationCore::addLoadPlugin string  plugin  )  throw (FileNotFound, runtime_error)
 

run_function SimulationCore::addPostprocessorPlugin string  plugin  )  throw (FileNotFound, runtime_error)
 

double SimulationCore::constrainLoadHeight double  ,
int 
 

DataOutPlugin* SimulationCore::dataOutPlugin  )  [inline]
 

void SimulationCore::deleteRegistrees  ) 
 

deletes all parameters of a specific category

Parameters:
cat plugin category

void SimulationCore::deleteRequests  ) 
 

int SimulationCore::displacementDimensions  ) 
 

void SimulationCore::exec  ) 
 

go!go!go!

int SimulationCore::getDimensions  ) 
 

double ** SimulationCore::getModelData  ) 
 

int SimulationCore::getQuadrant  ) 
 

list< string > SimulationCore::getRegisteredParameters PluginCategory  category  ) 
 

Parameters:
cat Plugin category
Returns:
list of string IDs of registered Parameters

list< string > SimulationCore::getRequestedNames  ) 
 

GreenPlugin* SimulationCore::greenPlugin  )  [inline]
 

int SimulationCore::gridSize  ) 
 

void SimulationCore::init  ) 
 

SimulationCore* SimulationCore::instance  )  throw () [inline, static]
 

SimulationCore::instance returns the only existing instance

SimulationCore* SimulationCore::instance int  argc,
char **  argv
throw () [inline, static]
 

SimulationCore::instance initializes singleton object in case it does not exist. returns the only existing instance

const char * SimulationCore::loadFile  ) 
 

LoadHistoryPlugin* SimulationCore::loadHistoryPlugin  )  [inline]
 

LoadPlugin* SimulationCore::loadPlugin  )  [inline]
 

int SimulationCore::minX  ) 
 

int SimulationCore::minY  ) 
 

int SimulationCore::modelTime  ) 
 

const char * SimulationCore::observeFile  ) 
 

SimulationCore const& SimulationCore::operator= SimulationCore const &  rvalue  )  [private]
 

hidden assignment operator - we do not want to accidentially copy objects

const char * SimulationCore::outFile  ) 
 

PluginManager * SimulationCore::pluginManager  ) 
 

void SimulationCore::registerOutputField int *  output_index,
FieldName  field
 

void SimulationCore::runExperimentManager  ) 
 

void SimulationCore::runPluginManager  ) 
 

void SimulationCore::setModelData double **   ) 
 

void SimulationCore::setQuadrant int   ) 
 

int SimulationCore::sizeT  ) 
 

int SimulationCore::sizeX  ) 
 

int SimulationCore::sizeY  ) 
 

int SimulationCore::stepSize  ) 
 

void SimulationCore::terminate  ) 
 

int SimulationCore::xIndex  ) 
 

int SimulationCore::yIndex  ) 
 

int SimulationCore::zIndex  ) 
 


Member Data Documentation

map<int*, int> SimulationCore::add_field_map [private]
 

InputHandler* SimulationCore::com_port [private]
 

hard-wired input handler, no plugin

int SimulationCore::dimensions [private]
 

ExperimentManager* SimulationCore::exp_man [private]
 

hard-wired experiment SimulationCore, no plugin

int SimulationCore::gridsize [private]
 

string SimulationCore::load_file [private]
 

double** SimulationCore::model_data [private]
 

int SimulationCore::modeltime [private]
 

the model time. an integer that is increased with each timestep

int SimulationCore::num_timesteps [private]
 

maximum number of timesteps we want to simulate

string SimulationCore::obs_file [private]
 

GreenPlugin* SimulationCore::pl_green [private]
 

Green's Function plug in, one factor for convolution

LoadHistoryPlugin* SimulationCore::pl_history [private]
 

Load history function plugin in, used by pl_load, in case model time > 0

list<Plugin*>::iterator SimulationCore::pl_iter [private]
 

Plugin* SimulationCore::pl_kernel [private]
 

Plug-in instance taking care on the simulation kernel

list<Plugin*> SimulationCore::pl_list_postprocess [private]
 

buffer for all the postprocessor plugins that might be loaded

list<Plugin*> SimulationCore::pl_list_postprocessor [private]
 

Postprocessor-Plugins, doing stuff with the model result

LoadPlugin* SimulationCore::pl_load [private]
 

Load function plug in, the second convolution factor

DataOutPlugin* SimulationCore::pl_out [private]
 

Plug-in instance handling data output

PluginManager* SimulationCore::plugin_man [private]
 

hard-wired plugin SimulationCore, no plugin ;)

SimulationCore * SimulationCore::pSimulationCore = 0 [static, private]
 

static Singleton initialisieren

pointer to the only instance of SimulationCore

int SimulationCore::quadrant [private]
 

list<Plugin*> SimulationCore::requested_plugin_list [private]
 

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

string SimulationCore::root_dir [private]
 

s_parameters SimulationCore::s_params = {} [static]
 

public struct keeping the command line arguments

int SimulationCore::stepsize [private]
 

time increment with each model step

int SimulationCore::x_east [private]
 

int SimulationCore::x_index [private]
 

int SimulationCore::x_west [private]
 

int SimulationCore::y_index [private]
 

int SimulationCore::y_north [private]
 

int SimulationCore::y_south [private]
 

int SimulationCore::z_index [private]
 


The documentation for this class was generated from the following files:
Generated on Sun Jul 29 08:17:36 2007 for CrusDe by doxygen 1.3.8