Computer Assited Medical Intervention Tool Kit  version 5.0
AnsysSimulator Class Reference

Simulator class to use Ansys as simulation engine. More...

#include <AnsysSimulator.h>

+ Inheritance diagram for AnsysSimulator:
+ Collaboration diagram for AnsysSimulator:

Public Member Functions

 AnsysSimulator (MonitoringManager *monitoringManager)
 constructor More...
 
 AnsysSimulator (MonitoringManager *monitoringManager, const char *file)
 constructor More...
 
virtual void createPml (const char *inputFile, const char *pmlFile)
 Create a pml file from an imput file. More...
 
bool doCalc ()
 make entire simulation ans store results of all step More...
 
void end ()
 end simultor More...
 
std::string getBatchFile ()
 get path to batch file More...
 
void getForce (int index, double force[3])
 get current force for one atom More...
 
int getMaxStep ()
 get the number of steps after simulation More...
 
void getPosition (int index, double position[3])
 get current position for one atom (use parameters) More...
 
double getTime (int step)
 get the time of simulation of a given step More...
 
void init ()
 initialize simulator More...
 
 ~AnsysSimulator ()
 destructor More...
 
- Public Member Functions inherited from NonInteractiveSimulator
 NonInteractiveSimulator (MonitoringManager *monitoringManager)
 constructor More...
 
 NonInteractiveSimulator (MonitoringManager *monitoringManager, const char *file)
 constructor More...
 
 ~NonInteractiveSimulator () override=default
 destructor More...
 
- Public Member Functions inherited from Simulator
 Simulator (MonitoringManager *monitoringManager)
 default constructor build a simulation from context provided by monitoringManager More...
 
 Simulator (MonitoringManager *monitoringManager, const char *file)
 constructor with simulator file build a simulation from context provided by monitoringManager and physical model provided by a simulator specific input file More...
 
void updatePositions ()
 update all current positions and store last positions More...
 
virtual ~Simulator ()=default
 destructor More...
 

Private Member Functions

void runAnsys ()
 start ansys with created batch file More...
 

Private Attributes

std::string ansysPath
 Ansys binary. More...
 
AnsysBatchbatch
 Ansys batch file creator. More...
 
std::string workingDir
 Ansys working dir. More...
 

Additional Inherited Members

- Protected Attributes inherited from Simulator
MonitoringManagermonitoringManager
 monitoring manager More...
 

Detailed Description

Simulator class to use Ansys as simulation engine.

Constructor & Destructor Documentation

◆ AnsysSimulator() [1/2]

AnsysSimulator::AnsysSimulator ( MonitoringManager monitoringManager)

constructor

◆ AnsysSimulator() [2/2]

AnsysSimulator::AnsysSimulator ( MonitoringManager monitoringManager,
const char *  file 
)

constructor

◆ ~AnsysSimulator()

AnsysSimulator::~AnsysSimulator ( )

destructor

References batch.

Member Function Documentation

◆ createPml()

void AnsysSimulator::createPml ( const char *  inputFile,
const char *  pmlFile 
)
virtual

Create a pml file from an imput file.

Implements NonInteractiveSimulator.

◆ doCalc()

bool AnsysSimulator::doCalc ( )
virtual

make entire simulation ans store results of all step

Returns
true if calculation succeded

Implements NonInteractiveSimulator.

References runAnsys(), and workingDir.

+ Here is the call graph for this function:

◆ end()

void AnsysSimulator::end ( )
virtual

end simultor

Implements NonInteractiveSimulator.

References workingDir.

◆ getBatchFile()

std::string AnsysSimulator::getBatchFile ( )

get path to batch file

References batch, AnsysBatch::getFileName(), and workingDir.

Referenced by AnsysWidget::AnsysWidget().

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

◆ getForce()

void AnsysSimulator::getForce ( int  index,
double  force[3] 
)
virtual

get current force for one atom

Implements Simulator.

◆ getMaxStep()

int AnsysSimulator::getMaxStep ( )
virtual

get the number of steps after simulation

Implements NonInteractiveSimulator.

References workingDir.

◆ getPosition()

void AnsysSimulator::getPosition ( int  index,
double  position[3] 
)
virtual

get current position for one atom (use parameters)

Implements NonInteractiveSimulator.

References MonitoringManager::getCurrentStep(), Simulator::monitoringManager, and workingDir.

+ Here is the call graph for this function:

◆ getTime()

double AnsysSimulator::getTime ( int  step)
virtual

get the time of simulation of a given step

Implements NonInteractiveSimulator.

References workingDir.

◆ init()

void AnsysSimulator::init ( )
virtual

initialize simulator

Implements NonInteractiveSimulator.

References batch, workingDir, and AnsysBatch::write().

+ Here is the call graph for this function:

◆ runAnsys()

void AnsysSimulator::runAnsys ( )
private

start ansys with created batch file

References ansysPath, batch, AnsysBatch::getFileName(), and workingDir.

Referenced by doCalc().

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

Member Data Documentation

◆ ansysPath

std::string AnsysSimulator::ansysPath
private

Ansys binary.

Referenced by runAnsys().

◆ batch

AnsysBatch* AnsysSimulator::batch
private

Ansys batch file creator.

Referenced by getBatchFile(), init(), runAnsys(), and ~AnsysSimulator().

◆ workingDir

std::string AnsysSimulator::workingDir
private

Ansys working dir.

Referenced by doCalc(), end(), getBatchFile(), getMaxStep(), getPosition(), getTime(), init(), and runAnsys().


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