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. | |
bool | doCalc () |
make computation of all steps with the simulator | |
void | doMove () override |
postprocess a simulation step, doCalc must have been done before | |
void | end () override |
End manager. | |
bool | init () override |
Initialize manager. | |
NonInteractiveMonitoringManager (const char *mml) | |
constructor | |
~NonInteractiveMonitoringManager () override | |
destructor | |
![]() | |
void | addMonitor (Monitor *monitor) |
add a monitor to the list | |
void | deleteMonitor (const unsigned int i) |
delete a monitor and remove it from the list using its index | |
Monitor * | getMonitor (const unsigned int i) const |
get a monitor by its index in the list | |
void | incStep () |
increment step by one | |
bool | isLmlPresent () |
check if a lml is present | |
bool | isPmlPresent () |
check if a scn is present instead of pmlFileName | |
MonitoringManager (const char *mml) | |
constructor | |
unsigned int | numberOfMonitor () const |
get the number of monitors stored in the list | |
void | reload (bool delPml=true) |
reload simulation with current parameters | |
void | rewind () |
Rewind simulation. | |
void | saveMmlIn (const char *fileName) |
save current version of mml in | |
void | saveMonitors () |
Save save monitors' state for the current time. | |
void | setCurrentTime (double time) |
mutators for simulation parameters | |
void | setDt (double dt) |
change dt and save modification into mmlIn | |
void | setLmlFileName (const char *file) |
change lml file name and save modification into mmlIn | |
void | setPmlFileName (const char *file) |
change pml file name and save modification into mmlIn | |
void | setRefresh (double refresh) |
change refresh and save modification into mmlIn | |
void | simulate () |
perform simulation loop, make tests and save monitors' data into output file | |
void | storeOldPositions () |
store old positions before next step | |
void | updateComputingTime () |
add step computing time to total computing time | |
void | updateCurrentTime () |
add dt to current time | |
void | writeCsv (const char *fileName) |
Write all saved monitors'state into csv file. | |
void | writeOutput (const char *fileName) |
Write all saved monitors' states into mmlOut file. | |
virtual | ~MonitoringManager () |
destructor | |
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. | |
Loads * | getLml () |
Loads * | takeLml () |
This is nearly the same as getLml(), but it also transfers ownership of the pointer. | |
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 | |
Additional Inherited Members | |
![]() | |
double | computingTime |
total computing time at current moment | |
double | currentTime |
time at current moment | |
double | dt |
integration step | |
std::unique_ptr< mml::MonitoringIn > | mmlIn |
Object representing manager in the file generated by xsdcxx, can be used for serialization. | |
std::vector< Monitor * > | monitors |
Vector that contains all monitors. | |
double | refresh |
refreshing step | |
Simulator * | simul |
the simulator used for simualtion | |
std::string | simulatorName |
name of the simulator | |
int | step |
current step | |
double | stepComputingTime |
computing time of last step | |
std::vector< mml::TimeStep * > | times |
Vector that contains information saved by saveMonitors method. | |
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
|
overridevirtual |
bool NonInteractiveMonitoringManager::doCalc | ( | ) |
make computation of all steps with the simulator
References NonInteractiveSimulator::doCalc().
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(), MonitoringManager::step, and Simulator::updatePositions().
|
overridevirtual |
|
overridevirtual |
Initialize manager.
Implements MonitoringManager.
References doCalc(), NonInteractiveSimulator::getMaxStep(), NonInteractiveSimulator::init(), MonitoringManager::simul, and Simulator::updatePositions().