27 lines
1.0 KiB
C++
27 lines
1.0 KiB
C++
#include "simulationmodelfactory.hpp"
|
|
|
|
SimulationModelFactory::SimulationModelFactory() {}
|
|
|
|
std::unique_ptr<SimulationModel>
|
|
SimulationModelFactory::create(const std::string& simulationModelLabel)
|
|
{
|
|
if (simulationModelLabel == DRMSimulationModel::label) {
|
|
return std::make_unique<DRMSimulationModel>();
|
|
} else if (simulationModelLabel == ChronosEulerSimulationModel::label) {
|
|
return std::make_unique<ChronosEulerSimulationModel>();
|
|
} else if (simulationModelLabel == ChronosEulerLinearSimulationModel::label) {
|
|
return std::make_unique<ChronosEulerLinearSimulationModel>();
|
|
} else if (simulationModelLabel ==
|
|
ChronosEulerNonLinearSimulationModel::label) {
|
|
return std::make_unique<ChronosEulerNonLinearSimulationModel>();
|
|
} else if (simulationModelLabel == LinearSimulationModel::label) {
|
|
return std::make_unique<LinearSimulationModel>();
|
|
}
|
|
std::cerr
|
|
<< "Simulation model used for computing the optimization results was "
|
|
"not recognized"
|
|
<< std::endl;
|
|
assert(false);
|
|
return nullptr;
|
|
}
|