Added linear and non linear chronos euler simulation model classes in order to be able to out-of-the-box use them with a factory class
This commit is contained in:
parent
7780e4ab38
commit
9fd536ccf3
|
@ -0,0 +1,13 @@
|
|||
#include "chronoseulerlinearsimulationmodel.hpp"
|
||||
|
||||
ChronosEulerLinearSimulationModel::ChronosEulerLinearSimulationModel() {}
|
||||
|
||||
SimulationResults ChronosEulerLinearSimulationModel::executeSimulation(
|
||||
const std::shared_ptr<SimulationJob> &pJob) {
|
||||
ChronosEulerSimulationModel simulationModel;
|
||||
simulationModel.settings.analysisType =
|
||||
ChronosEulerSimulationModel::Settings::AnalysisType::Linear;
|
||||
auto simulationResults = simulationModel.executeSimulation(pJob);
|
||||
simulationResults.simulationModelUsed = label;
|
||||
return simulationResults;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef CHRONOSEULERLINEARSIMULATIONMODEL_HPP
|
||||
#define CHRONOSEULERLINEARSIMULATIONMODEL_HPP
|
||||
|
||||
#include "chronoseulersimulationmodel.hpp"
|
||||
|
||||
class ChronosEulerLinearSimulationModel : public ChronosEulerSimulationModel {
|
||||
public:
|
||||
ChronosEulerLinearSimulationModel();
|
||||
SimulationResults
|
||||
executeSimulation(const std::shared_ptr<SimulationJob> &pJob);
|
||||
inline static std::string label{"Linear_" +
|
||||
ChronosEulerSimulationModel::label};
|
||||
};
|
||||
|
||||
#endif // CHRONOSEULERLINEARSIMULATIONMODEL_HPP
|
|
@ -0,0 +1,13 @@
|
|||
#include "chronoseulernonlinearsimulationmodel.hpp"
|
||||
|
||||
ChronosEulerNonLinearSimulationModel::ChronosEulerNonLinearSimulationModel() {}
|
||||
|
||||
SimulationResults ChronosEulerNonLinearSimulationModel::executeSimulation(
|
||||
const std::shared_ptr<SimulationJob> &pJob) {
|
||||
ChronosEulerSimulationModel simulationModel;
|
||||
simulationModel.settings.analysisType =
|
||||
ChronosEulerSimulationModel::Settings::AnalysisType::NonLinear;
|
||||
auto simulationResults = simulationModel.executeSimulation(pJob);
|
||||
simulationResults.simulationModelUsed = label;
|
||||
return simulationResults;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef CHRONOSEULERNONLINEARSIMULATIONMODEL_HPP
|
||||
#define CHRONOSEULERNONLINEARSIMULATIONMODEL_HPP
|
||||
|
||||
#include "chronoseulersimulationmodel.hpp"
|
||||
|
||||
class ChronosEulerNonLinearSimulationModel
|
||||
: public ChronosEulerSimulationModel {
|
||||
public:
|
||||
ChronosEulerNonLinearSimulationModel();
|
||||
SimulationResults
|
||||
executeSimulation(const std::shared_ptr<SimulationJob> &pJob);
|
||||
inline static std::string label{"NonLinear_" +
|
||||
ChronosEulerSimulationModel::label};
|
||||
};
|
||||
|
||||
#endif // CHRONOSEULERNONLINEARSIMULATIONMODEL_HPP
|
Loading…
Reference in New Issue