Computer Assited Medical Intervention Tool Kit  version 4.1
Public Member Functions | Private Attributes | List of all members
InteractiveMonitoringManager Class Reference

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

#include <InteractiveMonitoringManager.h>

Inherits MonitoringManager.

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...
 

Private Attributes

InteractiveSimulatorsimul
 the simulator used for simualtion More...
 
StoppingCriterionstop
 the stopping criteria to check in order to know when simulation loop should be stopped 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(), MonitoringManager::mmlIn, and stop.

◆ ~InteractiveMonitoringManager()

InteractiveMonitoringManager::~InteractiveMonitoringManager ( )
override

destructor

References end(), simul, and stop.

Member Function Documentation

◆ checkStop()

bool InteractiveMonitoringManager::checkStop ( )
overridevirtual

check if the stopping criterion is reached

Implements MonitoringManager.

References StoppingCriterion::checkCriterion(), and stop.

◆ doMove()

void InteractiveMonitoringManager::doMove ( )
overridevirtual

◆ end()

void InteractiveMonitoringManager::end ( )
overridevirtual

End manager.

Implements MonitoringManager.

References InteractiveSimulator::end(), and simul.

Referenced by ~InteractiveMonitoringManager().

◆ getStoppingCriterion()

StoppingCriterion * InteractiveMonitoringManager::getStoppingCriterion ( )

get Stopping Criterion

References stop.

Referenced by MonitoringDialog::updateStoppingCriteria().

◆ init()

bool InteractiveMonitoringManager::init ( )
overridevirtual

Member Data Documentation

◆ simul

InteractiveSimulator* InteractiveMonitoringManager::simul
private

the simulator used for simualtion

Referenced by doMove(), end(), init(), and ~InteractiveMonitoringManager().

◆ stop

StoppingCriterion* InteractiveMonitoringManager::stop
private

the stopping criteria to check in order to know when simulation loop should be stopped

Referenced by checkStop(), getStoppingCriterion(), InteractiveMonitoringManager(), and ~InteractiveMonitoringManager().


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