DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
Sfx::Simulation Class Reference

Bean that represents a simulation in the framework. Many of the attributes of the simulation bean are defined in the Simulation.properties file by the user of the framework. The Controller class uses the simulation bean to control the creation of the correct classes for the simulation. More...

#include <Sfx_Simulation.h>

Inheritance diagram for Sfx::Simulation:

Classes

struct  SimProp
 Property loaded at initialization (from file, user) Struct that hold parameters for the current simulation. At the end of the simulation these parameters will be saved (as a scenario) that could be retrieved later to run the scenario (it's not all clear in mind, but it will be part of the scenario concept). More...

Public Member Functions

std::string getCalculFFSchemeName () const noexcept
 Numerical algorithm for the current simulation.
void setCalculFFSchemeName (const std::string &aCalculFFSchemeName) noexcept
 Set Numerical flux pointer to function.
void setPerformMeasurement (bool measurement) noexcept
 Flag to set if measure to be taken.
void setNumberMeasurements (uint32 aNumofMeasurements) noexcept
 Set number of measurements.
void setDataStore (const std::string &dataStore) noexcept
 Use this method to specify the DataStore.
void setDataStoreFile (std::string aDataStoreFile) noexcept
 Use this method to specify the DataStoreFile.
void setDoFinalReport (bool doFinalReport) noexcept
bool doFinalReport () const noexcept
void setFinalReportClass (const std::string &finalReportClass) noexcept
 Use this method to define a class that performs a summary report of the simulation.
void setPhysicalConfigureClass (const std::string &aConfClass) noexcept
 Set configuration class name.
void setPhysicalAlgoClass (const std::string &aAlgoClass) noexcept
 Set algorithm class name.
bool getPerformMeasurement () const noexcept
 Getter.
uint32 getNumberMeasurements () const noexcept
 Getter.
std::string getDataStore () const noexcept
 Getter.
const std::string getDataStoreFile () const noexcept
 Getter.
void setPhysicalMeasurementClass (std::string aPhysicalMeasureClass)
 Set class name.
std::string getPhysicalMeasurementClass () const noexcept
 Use this method to get the PhysicalMeasurementClass.
std::string getPhysicalConfigurationClass () const noexcept
 Use this method to get the PhysicalConfigurationClass.
void setPhysicalConfigurationClass (std::string aPhysicalConfig) noexcept
 Use this method to specify the PhysicalConfigurationClass.
std::string getPhysicalAlgorithmClass () const noexcept
 Get the PhysicalAlgorithmClass name.
void setPhysicalAlgorithmClass (std::string aPhysicalAlgo) noexcept
 Use this method to specify the PhysicalAlgorithmClass.
std::string getFinalReportClass () const noexcept
 Get the class for the final report.
void setPhysicalSystemClass (std::string aPhysicalSystemClass) noexcept
 Use this method to specify the PhysicalSystemClass.
std::string getInitialCnd () const noexcept
 Initial conditon name.
void setBoundaryCnd (std::string aBoundaryCnd) noexcept
 Use this method to specify the Boundary Condition Type.
std::string getBoundaryCnd () noexcept
 boundary condition name
void setNumericalMethod (std::string aNumethod) noexcept
 Use this method to specify the Numerical Method.
std::string getNumericalMethod () const noexcept
 Getter.
float64 getSimulationStartTime () const noexcept
 Getter.
void setSimulationStartTime (float64 aStartTime) noexcept
 Use this method to specify the time at the start of the simulation.
void setSimulationTime (float64 aTime) noexcept
 Use this method to specify the time during any point during the simulation.
float64 getSimulationTime () const noexcept
 Return current time of the simulation.
void setNumTimeStep (uint32 aNumTimeStep) noexcept
 Set the number of time-step.
uint32 getNumTimeStep () noexcept
 Return the number of time step.
void setSimulationTimeStep (const float64 aTimeStep) noexcept
 Use this method to specify the timestep interval to be used to calculate the running time.
const float64 getSimulationTimeStep () const noexcept
 Use this method to get the interval which is usually a timestep.
void updateTime () noexcept
 Use this method to set the time during any point during the simulation.
std::string toString () const noexcept
 string representation of the object
Simulation::SimProp loadPropertyFile (const std::filesystem::path &aFilePropPath)
 load property file of the simulation
void setParamsFileName (std::string aPropFileName)
 Set file name.
std::string getParamsFileName () const
 Getter.

Public Attributes

struct Sfx::Simulation::SimProp m_simProp

Protected Member Functions

 Simulation ()=default
 prevent client from using it
 ~Simulation ()=default
 Dtor.
 Simulation (const Simulation &aOther)=delete
 Disable copy ctor.
Simulationoperator= (const Simulation &aOther)=delete
 Disable assign ctor.

Private Types

using ArrayType = std::vector<float64>
 Alias (array type)

Friends

class Sfx::SfxSingleton< Simulation >
 Declare as friend of the class to access protected default ctor.

Detailed Description

Bean that represents a simulation in the framework. Many of the attributes of the simulation bean are defined in the Simulation.properties file by the user of the framework. The Controller class uses the simulation bean to control the creation of the correct classes for the simulation.

Member Typedef Documentation

◆ ArrayType

using Sfx::Simulation::ArrayType = std::vector<float64>
private

Alias (array type)

Constructor & Destructor Documentation

◆ Simulation() [1/2]

Sfx::Simulation::Simulation ( )
protecteddefault

prevent client from using it

◆ ~Simulation()

Sfx::Simulation::~Simulation ( )
protecteddefault

Dtor.

◆ Simulation() [2/2]

Sfx::Simulation::Simulation ( const Simulation & aOther)
protecteddelete

Disable copy ctor.

Parameters
aOtherobject to copy from

Member Function Documentation

◆ doFinalReport()

bool Sfx::Simulation::doFinalReport ( ) const
inlinenoexcept

Use this method to query whether to produce a final report or not.

◆ getBoundaryCnd()

std::string Sfx::Simulation::getBoundaryCnd ( )
inlinenoexcept

boundary condition name

Returns
string

◆ getCalculFFSchemeName()

std::string Sfx::Simulation::getCalculFFSchemeName ( ) const
inlinenoexcept

Numerical algorithm for the current simulation.

Returns
name of the algorithm

◆ getDataStore()

std::string Sfx::Simulation::getDataStore ( ) const
inlinenoexcept

Getter.

Returns
data store name

◆ getDataStoreFile()

const std::string Sfx::Simulation::getDataStoreFile ( ) const
inlinenoexcept

Getter.

Returns
data store file

◆ getFinalReportClass()

std::string Sfx::Simulation::getFinalReportClass ( ) const
inlinenoexcept

Get the class for the final report.

Returns
name of final report class

◆ getInitialCnd()

std::string Sfx::Simulation::getInitialCnd ( ) const
inlinenoexcept

Initial conditon name.

Returns
string

◆ getNumberMeasurements()

uint32 Sfx::Simulation::getNumberMeasurements ( ) const
inlinenoexcept

Getter.

Returns
number of measurement

◆ getNumericalMethod()

std::string Sfx::Simulation::getNumericalMethod ( ) const
inlinenoexcept

Getter.

Returns
numerical method name

◆ getNumTimeStep()

uint32 Sfx::Simulation::getNumTimeStep ( )
inlinenoexcept

Return the number of time step.

Returns
number time step

◆ getParamsFileName()

std::string Sfx::Simulation::getParamsFileName ( ) const
inline

Getter.

Returns
Simulation property file name

◆ getPerformMeasurement()

bool Sfx::Simulation::getPerformMeasurement ( ) const
inlinenoexcept

Getter.

Returns
true/false

◆ getPhysicalAlgorithmClass()

std::string Sfx::Simulation::getPhysicalAlgorithmClass ( ) const
inlinenoexcept

Get the PhysicalAlgorithmClass name.

Returns
string description

◆ getPhysicalConfigurationClass()

std::string Sfx::Simulation::getPhysicalConfigurationClass ( ) const
inlinenoexcept

Use this method to get the PhysicalConfigurationClass.

Returns
class name

◆ getPhysicalMeasurementClass()

std::string Sfx::Simulation::getPhysicalMeasurementClass ( ) const
inlinenoexcept

Use this method to get the PhysicalMeasurementClass.

Returns
class name

◆ getSimulationStartTime()

float64 Sfx::Simulation::getSimulationStartTime ( ) const
inlinenoexcept

Getter.

Returns
Return the time of the simulation

◆ getSimulationTime()

float64 Sfx::Simulation::getSimulationTime ( ) const
inlinenoexcept

Return current time of the simulation.

Returns
time of the simulation

◆ getSimulationTimeStep()

const float64 Sfx::Simulation::getSimulationTimeStep ( ) const
inlinenoexcept

Use this method to get the interval which is usually a timestep.

Returns
time step

◆ loadPropertyFile()

Sfx::Simulation::SimProp Sfx::Simulation::loadPropertyFile ( const std::filesystem::path & aFilePropPath)

load property file of the simulation

Parameters
aFilePropPath
Returns
Simulation property structure

◆ operator=()

Simulation & Sfx::Simulation::operator= ( const Simulation & aOther)
protecteddelete

Disable assign ctor.

Parameters
aOtherobject to copy from
Returns
this

◆ setBoundaryCnd()

void Sfx::Simulation::setBoundaryCnd ( std::string aBoundaryCnd)
inlinenoexcept

Use this method to specify the Boundary Condition Type.

◆ setCalculFFSchemeName()

void Sfx::Simulation::setCalculFFSchemeName ( const std::string & aCalculFFSchemeName)
inlinenoexcept

Set Numerical flux pointer to function.

Parameters
aCalculFFSchemeNamepointer to function flux algorithm

◆ setDataStore()

void Sfx::Simulation::setDataStore ( const std::string & dataStore)
inlinenoexcept

Use this method to specify the DataStore.

Parameters
dataStoreName of data store

◆ setDataStoreFile()

void Sfx::Simulation::setDataStoreFile ( std::string aDataStoreFile)
inlinenoexcept

Use this method to specify the DataStoreFile.

Parameters
aDataStoreFiledata store file name

◆ setDoFinalReport()

void Sfx::Simulation::setDoFinalReport ( bool doFinalReport)
inlinenoexcept

Use this method to indicate a final report should be produced

◆ setFinalReportClass()

void Sfx::Simulation::setFinalReportClass ( const std::string & finalReportClass)
inlinenoexcept

Use this method to define a class that performs a summary report of the simulation.

Parameters
finalReportClassclass name

◆ setNumberMeasurements()

void Sfx::Simulation::setNumberMeasurements ( uint32 aNumofMeasurements)
inlinenoexcept

Set number of measurements.

Parameters
aNumofMeasurements

◆ setNumericalMethod()

void Sfx::Simulation::setNumericalMethod ( std::string aNumethod)
inlinenoexcept

Use this method to specify the Numerical Method.

◆ setNumTimeStep()

void Sfx::Simulation::setNumTimeStep ( uint32 aNumTimeStep)
inlinenoexcept

Set the number of time-step.

Parameters
aNumTimeStep

◆ setParamsFileName()

void Sfx::Simulation::setParamsFileName ( std::string aPropFileName)
inline

Set file name.

Parameters
aPropFileNameSimulation property file name

◆ setPerformMeasurement()

void Sfx::Simulation::setPerformMeasurement ( bool measurement)
inlinenoexcept

Flag to set if measure to be taken.

Parameters
measurementflag true/false

◆ setPhysicalAlgoClass()

void Sfx::Simulation::setPhysicalAlgoClass ( const std::string & aAlgoClass)
inlinenoexcept

Set algorithm class name.

Parameters
aAlgoClassalgorithm name

◆ setPhysicalAlgorithmClass()

void Sfx::Simulation::setPhysicalAlgorithmClass ( std::string aPhysicalAlgo)
inlinenoexcept

Use this method to specify the PhysicalAlgorithmClass.

◆ setPhysicalConfigurationClass()

void Sfx::Simulation::setPhysicalConfigurationClass ( std::string aPhysicalConfig)
inlinenoexcept

Use this method to specify the PhysicalConfigurationClass.

Parameters
aPhysicalConfigclass name

◆ setPhysicalConfigureClass()

void Sfx::Simulation::setPhysicalConfigureClass ( const std::string & aConfClass)
inlinenoexcept

Set configuration class name.

Parameters
aConfClassclass name

◆ setPhysicalMeasurementClass()

void Sfx::Simulation::setPhysicalMeasurementClass ( std::string aPhysicalMeasureClass)
inline

Set class name.

Parameters
aPhysicalMeasureClassclass name

◆ setPhysicalSystemClass()

void Sfx::Simulation::setPhysicalSystemClass ( std::string aPhysicalSystemClass)
inlinenoexcept

Use this method to specify the PhysicalSystemClass.

Parameters
aPhysicalSystemClass

◆ setSimulationStartTime()

void Sfx::Simulation::setSimulationStartTime ( float64 aStartTime)
inlinenoexcept

Use this method to specify the time at the start of the simulation.

Parameters
aStartTimestart time

◆ setSimulationTime()

void Sfx::Simulation::setSimulationTime ( float64 aTime)
inlinenoexcept

Use this method to specify the time during any point during the simulation.

Parameters
aTimesimulation time

◆ setSimulationTimeStep()

void Sfx::Simulation::setSimulationTimeStep ( const float64 aTimeStep)
inlinenoexcept

Use this method to specify the timestep interval to be used to calculate the running time.

◆ toString()

std::string Sfx::Simulation::toString ( ) const
inlinenoexcept

string representation of the object

Returns
string

◆ updateTime()

void Sfx::Simulation::updateTime ( )
inlinenoexcept

Use this method to set the time during any point during the simulation.

◆ Sfx::SfxSingleton< Simulation >

friend class Sfx::SfxSingleton< Simulation >
friend

Declare as friend of the class to access protected default ctor.

Member Data Documentation

◆ m_simProp

struct Sfx::Simulation::SimProp Sfx::Simulation::m_simProp

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