OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
SolverBase Class Referenceabstract

#include "SolverBase.h"

Inheritance diagram for SolverBase:
SolverElectrostatics SolverElectrostatics

Public Member Functions

 SolverBase ()
 
virtual ~SolverBase ()
 
void setData (EntityBase *_solverEntity, const std::string &_meshDataName, std::map< ot::UID, ot::EntityInformation > &_meshItemInfo, std::map< ot::UID, EntityProperties > &_entityProperties, std::map< std::string, size_t > &_groupNameToIdMap, std::map< std::string, EntityProperties > &_materialProperties)
 
virtual void writeInputFile (std::ofstream &controlFile, Application *app)=0
 
virtual std::string runSolver (const std::string &tempDirPath, ot::components::UiComponent *uiComponent)=0
 
virtual void convertResults (const std::string &tempDirPath, Application *app, EntityBase *solverEntity)=0
 
void runSolverExe (const std::string &inputFileName, const std::string &solvTarget, const std::string &postTarget, const std::string &workingDirectory, ot::components::UiComponent *uiComponent)
 
 SolverBase ()
 
virtual ~SolverBase ()
 
void setData (EntityBase *_solverEntity, const std::string &_meshDataName, std::map< ot::UID, ot::EntityInformation > &_meshItemInfo, std::map< ot::UID, EntityProperties > &_entityProperties, std::map< std::string, size_t > &_groupNameToIdMap, std::map< std::string, EntityProperties > &_materialProperties)
 
virtual void writeInputFile (std::ofstream &controlFile, Application *app)=0
 
virtual std::string runSolver (const std::string &tempDirPath, ot::components::UiComponent *uiComponent)=0
 
virtual void convertResults (const std::string &tempDirPath, Application *app, EntityBase *solverEntity)=0
 
void runSolverExe (const std::string &inputFileName, const std::string &solvTarget, const std::string &postTarget, const std::string &workingDirectory, ot::components::UiComponent *uiComponent)
 

Protected Member Functions

bool runExecutableAndWaitForCompletion (std::string commandLine, std::string workingDirectory, ot::components::UiComponent *uiComponent)
 
std::string readEnvironmentVariable (const std::string &variableName)
 
bool isPECMaterial (const std::string &materialName)
 
void ReadFromPipe (HANDLE g_hChildStd_OUT_Rd, ot::components::UiComponent *uiComponent)
 
bool runExecutableAndWaitForCompletion (std::string commandLine, std::string workingDirectory, ot::components::UiComponent *uiComponent)
 
std::string readEnvironmentVariable (const std::string &variableName)
 
bool isPECMaterial (const std::string &materialName)
 
void ReadFromPipe (HANDLE g_hChildStd_OUT_Rd, ot::components::UiComponent *uiComponent)
 

Protected Attributes

EntityBase * solverEntity
 
std::string meshDataName
 
std::map< ot::UID, ot::EntityInformation > meshItemInfo
 
std::map< ot::UID, EntityProperties > entityProperties
 
std::map< std::string, size_t > groupNameToIdMap
 
std::map< std::string, EntityProperties > materialProperties
 
std::stringstream solverOutput
 

Constructor & Destructor Documentation

◆ SolverBase() [1/2]

SolverBase::SolverBase ( )
inline

◆ ~SolverBase() [1/2]

virtual SolverBase::~SolverBase ( )
inlinevirtual

◆ SolverBase() [2/2]

SolverBase::SolverBase ( )
inline

◆ ~SolverBase() [2/2]

virtual SolverBase::~SolverBase ( )
inlinevirtual

Member Function Documentation

◆ convertResults() [1/2]

virtual void SolverBase::convertResults ( const std::string & tempDirPath,
Application * app,
EntityBase * solverEntity )
pure virtual

◆ convertResults() [2/2]

virtual void SolverBase::convertResults ( const std::string & tempDirPath,
Application * app,
EntityBase * solverEntity )
pure virtual

◆ isPECMaterial() [1/2]

bool SolverBase::isPECMaterial ( const std::string & materialName)
protected

◆ isPECMaterial() [2/2]

bool SolverBase::isPECMaterial ( const std::string & materialName)
protected

◆ readEnvironmentVariable() [1/2]

std::string SolverBase::readEnvironmentVariable ( const std::string & variableName)
protected

◆ readEnvironmentVariable() [2/2]

std::string SolverBase::readEnvironmentVariable ( const std::string & variableName)
protected

◆ ReadFromPipe() [1/2]

void SolverBase::ReadFromPipe ( HANDLE g_hChildStd_OUT_Rd,
ot::components::UiComponent * uiComponent )
protected

◆ ReadFromPipe() [2/2]

void SolverBase::ReadFromPipe ( HANDLE g_hChildStd_OUT_Rd,
ot::components::UiComponent * uiComponent )
protected

◆ runExecutableAndWaitForCompletion() [1/2]

bool SolverBase::runExecutableAndWaitForCompletion ( std::string commandLine,
std::string workingDirectory,
ot::components::UiComponent * uiComponent )
protected

◆ runExecutableAndWaitForCompletion() [2/2]

bool SolverBase::runExecutableAndWaitForCompletion ( std::string commandLine,
std::string workingDirectory,
ot::components::UiComponent * uiComponent )
protected

◆ runSolver() [1/2]

virtual std::string SolverBase::runSolver ( const std::string & tempDirPath,
ot::components::UiComponent * uiComponent )
pure virtual

◆ runSolver() [2/2]

virtual std::string SolverBase::runSolver ( const std::string & tempDirPath,
ot::components::UiComponent * uiComponent )
pure virtual

◆ runSolverExe() [1/2]

void SolverBase::runSolverExe ( const std::string & inputFileName,
const std::string & solvTarget,
const std::string & postTarget,
const std::string & workingDirectory,
ot::components::UiComponent * uiComponent )

◆ runSolverExe() [2/2]

void SolverBase::runSolverExe ( const std::string & inputFileName,
const std::string & solvTarget,
const std::string & postTarget,
const std::string & workingDirectory,
ot::components::UiComponent * uiComponent )

◆ setData() [1/2]

void SolverBase::setData ( EntityBase * _solverEntity,
const std::string & _meshDataName,
std::map< ot::UID, ot::EntityInformation > & _meshItemInfo,
std::map< ot::UID, EntityProperties > & _entityProperties,
std::map< std::string, size_t > & _groupNameToIdMap,
std::map< std::string, EntityProperties > & _materialProperties )

◆ setData() [2/2]

void SolverBase::setData ( EntityBase * _solverEntity,
const std::string & _meshDataName,
std::map< ot::UID, ot::EntityInformation > & _meshItemInfo,
std::map< ot::UID, EntityProperties > & _entityProperties,
std::map< std::string, size_t > & _groupNameToIdMap,
std::map< std::string, EntityProperties > & _materialProperties )

◆ writeInputFile() [1/2]

virtual void SolverBase::writeInputFile ( std::ofstream & controlFile,
Application * app )
pure virtual

◆ writeInputFile() [2/2]

virtual void SolverBase::writeInputFile ( std::ofstream & controlFile,
Application * app )
pure virtual

Member Data Documentation

◆ entityProperties

std::map< ot::UID, EntityProperties > SolverBase::entityProperties
protected

◆ groupNameToIdMap

std::map< std::string, size_t > SolverBase::groupNameToIdMap
protected

◆ materialProperties

std::map< std::string, EntityProperties > SolverBase::materialProperties
protected

◆ meshDataName

std::string SolverBase::meshDataName
protected

◆ meshItemInfo

std::map< ot::UID, ot::EntityInformation > SolverBase::meshItemInfo
protected

◆ solverEntity

EntityBase * SolverBase::solverEntity
protected

◆ solverOutput

std::stringstream SolverBase::solverOutput
protected

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