![]() |
GemaCoreLib
The GeMA Core library
|
Auxiliar class used to store the complete set of solution methods data for a simulation. More...
#include <gmSolutionData.h>
Public Member Functions | |
GmSolutionData () | |
Constructor. | |
~GmSolutionData () | |
Destructor. | |
void | clear () |
Clears the solution data, deleting every solution object and restoring the object to its construction state. | |
const QMap< QString, GmPhysics * > & | physics () const |
Returns a const refernce to the state vars map. | |
const QMap< QString, GmNumSolver * > & | numSolvers () const |
Returns a const refernce to the numerical solvers map. | |
bool | addPhysics (GmPhysics *phys) |
Adds a physical method to the model. Returns false if an object with the same id already exists. The model takes ownership of the object. | |
bool | addNumSolver (GmNumSolver *nsolver) |
Adds a numeric solver to the model. Returns false if an object with the same id already exists. The model takes ownership of the object. | |
LuaFunction & | mainScript () |
Returns a reference for the main lua script. | |
const QMap< QString, QString > & | processSetMap () const |
Returns the map asscoiating process set names with plugin names. | |
void | setMainScript (LuaFunction &f) |
Updates the main Lua script used for the simulation. | |
bool | addProcessSet (QString setName, QString pluginName) |
Adds a new entry to the process set map. Returns false if the setName already exists in the map. | |
void | printInfo (const GmLogCategory &logger) |
Prints information about the simulation using the provided logger (Info category) | |
Private Member Functions | |
template<class T > | |
bool | addObjectToMap (T *obj, QMap< QString, T * > &map) |
Adds a new object to the list of existing ones. If an object with the same id already exists, does nothing. More... | |
Private Attributes | |
LuaFunction | _mainScript |
Reference for the main script function. | |
QMap< QString, QString > | _processSetMap |
Map storing for each process function group the name of the plugin that implements it. | |
QMap< QString, GmPhysics * > | _physicsMap |
Map storing physics objects, keyed by physics id. | |
QMap< QString, GmNumSolver * > | _numSolverMap |
Map storing numeric solvers, keyed by solver id. | |
Auxiliar class used to store the complete set of solution methods data for a simulation.
|
private |
Adds a new object to the list of existing ones. If an object with the same id already exists, does nothing.
The model will take the ownership of the added object, which means that it will be deleted by the model data. Returns true if the object was inserted in the list.