Computer Assisted Medical Intervention Tool Kit  version 5.2
InteractiveMonitoringManager Class Reference

Interactice managers are managers linked with an interactive simulator. More...

#include <InteractiveMonitoringManager.h>

+ Inheritance diagram for InteractiveMonitoringManager:
+ Collaboration diagram for InteractiveMonitoringManager:

Public Member Functions

bool checkStop () override
 check if the stopping criterion is reached More...
 
void doMove () override
 make a simulation move (one step) More...
 
void end () override
 End manager. More...
 
StoppingCriteriongetStoppingCriterion ()
 get Stopping Criterion More...
 
bool init () override
 Initialize manager. More...
 
 InteractiveMonitoringManager (const char *mml)
 constructor More...
 
 ~InteractiveMonitoringManager () 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...
 
MonitorgetMonitor (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 ()
 
PhysicalModelgetInitPml ()
 
PhysicalModelgetPml ()
 
PhysicalModeltakePml ()
 This is nearly the same as getPml(), but it also transfers ownership of the pointer. More...
 
LoadsgetLml ()
 
LoadstakeLml ()
 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 ()
 
SimulatorgetSimulator ()
 
void getOldPosition (double pos[3], unsigned int index)
 get atom position for precedent step 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...
 
Simulatorsimul
 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...
 

Detailed Description

Interactice managers are managers linked with an interactive simulator.

Constructor & Destructor Documentation

◆ InteractiveMonitoringManager()

InteractiveMonitoringManager::InteractiveMonitoringManager ( const char *  mml)

constructor

Parameters
mmlmml file name
simsimulator name (Sofa, Ansys...)

References StoppingCriterionFactory::createStoppingCriterion(), and MonitoringManager::mmlIn.

+ Here is the call graph for this function:

◆ ~InteractiveMonitoringManager()

InteractiveMonitoringManager::~InteractiveMonitoringManager ( )
override

destructor

References end().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkStop()

bool InteractiveMonitoringManager::checkStop ( )
overridevirtual

check if the stopping criterion is reached

Implements MonitoringManager.

References StoppingCriterion::checkCriterion().

+ Here is the call graph for this function:

◆ doMove()

void InteractiveMonitoringManager::doMove ( )
overridevirtual

make a simulation move (one step)

Implements MonitoringManager.

References InteractiveSimulator::doMove(), MonitoringManager::dt, MonitoringManager::incStep(), MonitoringManager::saveMonitors(), Chrono::start(), MonitoringManager::stepComputingTime, Chrono::stop(), MonitoringManager::updateComputingTime(), MonitoringManager::updateCurrentTime(), and Simulator::updatePositions().

+ Here is the call graph for this function:

◆ end()

void InteractiveMonitoringManager::end ( )
overridevirtual

End manager.

Implements MonitoringManager.

References InteractiveSimulator::end().

Referenced by ~InteractiveMonitoringManager().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStoppingCriterion()

StoppingCriterion * InteractiveMonitoringManager::getStoppingCriterion ( )

get Stopping Criterion

Referenced by MonitoringDialog::updateStoppingCriteria().

+ Here is the caller graph for this function:

◆ init()

bool InteractiveMonitoringManager::init ( )
overridevirtual

Initialize manager.

Implements MonitoringManager.

References InteractiveSimulator::init(), MonitoringManager::simul, and Simulator::updatePositions().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: