Computer Assisted Medical Intervention Tool Kit  version 5.2
 
Loading...
Searching...
No Matches
NonInteractiveMonitoringManager Class Reference

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
 
- Public Member Functions inherited from MonitoringManager
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
 
MonitorgetMonitor (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 ()
 
PhysicalModelgetInitPml ()
 
PhysicalModelgetPml ()
 
PhysicalModeltakePml ()
 This is nearly the same as getPml(), but it also transfers ownership of the pointer.
 
LoadsgetLml ()
 
LoadstakeLml ()
 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 ()
 
SimulatorgetSimulator ()
 
void getOldPosition (double pos[3], unsigned int index)
 get atom position for precedent step
 

Additional Inherited Members

- Protected Attributes inherited from MonitoringManager
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
 
Simulatorsimul
 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.
 

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

Member Function Documentation

◆ checkStop()

bool NonInteractiveMonitoringManager::checkStop ( )
overridevirtual

Check if simulation is finished.

Implements MonitoringManager.

References MonitoringManager::step.

◆ doCalc()

bool NonInteractiveMonitoringManager::doCalc ( )

make computation of all steps with the simulator

Returns
false if calculation failed

References NonInteractiveSimulator::doCalc().

Referenced by init().

◆ doMove()

void NonInteractiveMonitoringManager::doMove ( )
overridevirtual

◆ end()

void NonInteractiveMonitoringManager::end ( )
overridevirtual

End manager.

Implements MonitoringManager.

References NonInteractiveSimulator::end().

◆ init()

bool NonInteractiveMonitoringManager::init ( )
overridevirtual

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