Computer Assited Medical Intervention Tool Kit  version 5.0
NonInteractiveMonitoringManager Class Reference

NonInteractice managers are managers linked with an non interactive simulator. More...

#include <NonInteractiveMonitoringManager.h>

+ Inheritance diagram for NonInteractiveMonitoringManager:
+ Collaboration diagram for NonInteractiveMonitoringManager:

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

int maxStep
 the number of step unsed for simulation More...
 
NonInteractiveSimulatorsimul
 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...
 
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

NonInteractice managers are managers linked with an non interactive simulator.

Constructor & Destructor Documentation

◆ NonInteractiveMonitoringManager()

NonInteractiveMonitoringManager::NonInteractiveMonitoringManager ( const char *  mml)

constructor

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

◆ ~NonInteractiveMonitoringManager()

NonInteractiveMonitoringManager::~NonInteractiveMonitoringManager ( )
override

destructor

References simul.

Member Function Documentation

◆ checkStop()

bool NonInteractiveMonitoringManager::checkStop ( )
overridevirtual

Check if simulation is finished.

Implements MonitoringManager.

References maxStep, and MonitoringManager::step.

◆ doCalc()

bool NonInteractiveMonitoringManager::doCalc ( )

make computation of all steps with the simulator

Returns
false if calculation failed

References NonInteractiveSimulator::doCalc(), and simul.

Referenced by init().

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

◆ doMove()

void NonInteractiveMonitoringManager::doMove ( )
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().

+ Here is the call graph for this function:

◆ end()

void NonInteractiveMonitoringManager::end ( )
overridevirtual

End manager.

Implements MonitoringManager.

References NonInteractiveSimulator::end(), and simul.

+ Here is the call graph for this function:

◆ init()

bool NonInteractiveMonitoringManager::init ( )
overridevirtual

Initialize manager.

Implements MonitoringManager.

References doCalc(), NonInteractiveSimulator::getMaxStep(), NonInteractiveSimulator::init(), maxStep, simul, MonitoringManager::simul, and Simulator::updatePositions().

+ Here is the call graph for this function:

Member Data Documentation

◆ maxStep

int NonInteractiveMonitoringManager::maxStep
private

the number of step unsed for simulation

Referenced by checkStop(), and init().

◆ simul

NonInteractiveSimulator* NonInteractiveMonitoringManager::simul
private

the simulator used for simualtion

Referenced by doCalc(), doMove(), end(), init(), and ~NonInteractiveMonitoringManager().


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