NonInteractice managers are managers linked with an non interactive simulator. More...
#include <NonInteractiveMonitoringManager.h>
Public Member Functions | |
bool | checkStop () override |
Check if simulation is finished. More... | |
bool | doCalc () |
make computation of all steps with the simulator More... | |
void | doMove () override |
postprocess a simulation step, doCalc must have been done before More... | |
void | end () override |
End manager. More... | |
bool | init () override |
Initialize manager. More... | |
NonInteractiveMonitoringManager (const char *mml) | |
constructor More... | |
~NonInteractiveMonitoringManager () override | |
destructor More... | |
Public Member Functions inherited from MonitoringManager | |
void | addMonitor (Monitor *monitor) |
add a monitor to the list More... | |
void | deleteMonitor (const unsigned int i) |
delete a monitor and remove it from the list using its index More... | |
Monitor * | getMonitor (const unsigned int i) const |
get a monitor by its index in the list More... | |
void | incStep () |
increment step by one More... | |
bool | isLmlPresent () |
check if a lml is present More... | |
bool | isPmlPresent () |
check if a scn is present instead of pmlFileName More... | |
MonitoringManager (const char *mml) | |
constructor More... | |
unsigned int | numberOfMonitor () const |
get the number of monitors stored in the list More... | |
void | reload (bool delPml=true) |
reload simulation with current parameters More... | |
void | rewind () |
Rewind simulation. More... | |
void | saveMmlIn (const char *fileName) |
save current version of mml in More... | |
void | saveMonitors () |
Save save monitors' state for the current time. More... | |
void | setCurrentTime (double time) |
mutators for simulation parameters More... | |
void | setDt (double dt) |
change dt and save modification into mmlIn More... | |
void | setLmlFileName (const char *file) |
change lml file name and save modification into mmlIn More... | |
void | setPmlFileName (const char *file) |
change pml file name and save modification into mmlIn More... | |
void | setRefresh (double refresh) |
change refresh and save modification into mmlIn More... | |
void | simulate () |
perform simulation loop, make tests and save monitors' data into output file More... | |
void | storeOldPositions () |
store old positions before next step More... | |
void | updateComputingTime () |
add step computing time to total computing time More... | |
void | updateCurrentTime () |
add dt to current time More... | |
void | writeCsv (const char *fileName) |
Write all saved monitors'state into csv file. More... | |
void | writeOutput (const char *fileName) |
Write all saved monitors' states into mmlOut file. More... | |
virtual | ~MonitoringManager () |
destructor More... | |
double | getDt () |
double | getRefresh () |
double | getCurrentTime () |
double | getCurrentStep () |
double | getStepComputingTime () |
double | getComputingTime () |
PhysicalModel * | getInitPml () |
PhysicalModel * | getPml () |
PhysicalModel * | takePml () |
This is nearly the same as getPml(), but it also transfers ownership of the pointer. More... | |
Loads * | getLml () |
Loads * | takeLml () |
This is nearly the same as getLml(), but it also transfers ownership of the pointer. More... | |
std::string | getPmlFileName () |
std::string | getLmlFileName () |
std::string | getMmlFileName () |
std::string | getmmlFileFolder () |
Simulator * | getSimulator () |
void | getOldPosition (double pos[3], unsigned int index) |
get atom position for precedent step More... | |
Private Attributes | |
int | maxStep |
the number of step unsed for simulation More... | |
NonInteractiveSimulator * | simul |
the simulator used for simualtion More... | |
Additional Inherited Members | |
Protected Attributes inherited from MonitoringManager | |
double | computingTime |
total computing time at current moment More... | |
double | currentTime |
time at current moment More... | |
double | dt |
integration step More... | |
std::unique_ptr< mml::MonitoringIn > | mmlIn |
Object representing manager in the file generated by xsdcxx, can be used for serialization. More... | |
std::vector< Monitor * > | monitors |
Vector that contains all monitors. More... | |
double | refresh |
refreshing step More... | |
Simulator * | simul |
the simulator used for simualtion More... | |
std::string | simulatorName |
name of the simulator More... | |
int | step |
current step More... | |
double | stepComputingTime |
computing time of last step More... | |
std::vector< mml::TimeStep * > | times |
Vector that contains information saved by saveMonitors method. More... | |
NonInteractice managers are managers linked with an non interactive simulator.
NonInteractiveMonitoringManager::NonInteractiveMonitoringManager | ( | const char * | mml | ) |
constructor
mml | mml file name |
sim | simulator name (Sofa, Ansys...) |
|
override |
destructor
References simul.
|
overridevirtual |
Check if simulation is finished.
Implements MonitoringManager.
References maxStep, and MonitoringManager::step.
bool NonInteractiveMonitoringManager::doCalc | ( | ) |
make computation of all steps with the simulator
References NonInteractiveSimulator::doCalc(), and simul.
Referenced by init().
|
overridevirtual |
postprocess a simulation step, doCalc must have been done before
Implements MonitoringManager.
References MonitoringManager::currentTime, NonInteractiveSimulator::getTime(), MonitoringManager::incStep(), MonitoringManager::saveMonitors(), simul, MonitoringManager::step, and Simulator::updatePositions().
|
overridevirtual |
End manager.
Implements MonitoringManager.
References NonInteractiveSimulator::end(), and simul.
|
overridevirtual |
Initialize manager.
Implements MonitoringManager.
References doCalc(), NonInteractiveSimulator::getMaxStep(), NonInteractiveSimulator::init(), maxStep, simul, MonitoringManager::simul, and Simulator::updatePositions().
|
private |
the number of step unsed for simulation
Referenced by checkStop(), and init().
|
private |
the simulator used for simualtion
Referenced by doCalc(), doMove(), end(), init(), and ~NonInteractiveMonitoringManager().