1#ifndef SIMULATION_CLASS_UNIT_TESTING_H
2#define SIMULATION_CLASS_UNIT_TESTING_H
36 std::string m_init_str{
"InitChain"};
37 std::string m_preTs_str{
"PreTimeStepChain"};
38 std::string m_postTs_str{
"PostTimeStepChain"};
39 std::string m_postNonLinIter_str{
"PostNonLinIterChain"};
40 std::string m_output_str{
"OutputChain"};
49 (std::filesystem::path(
PROJECT_ROOT) /
"build/tests/ini_files/");
53 std::vector<std::string>
lines;
59 if (
line.rfind(
"ini_folder_path =", 0) == 0)
68 for (
const auto&
l :
lines)
82 this->m_simulation_config.loadUserInput(
83 this->m_simulation_config.getStringParameters(
"ini_folder_path") +
user_ini);
89 this->setAbsoluteDefaultIniPath();
103 std::unique_ptr<ShapeFactory<T>>
shape_creator{std::make_unique<ShapeFactory<T>>(
104 this, this->m_simulation_config.getBoolParameters(
"use_shape_file"),
105 this->m_simulation_config.getStringParameters(
"spatial_dimension"))};
107 std::unique_ptr<GridFactory<T>>
grid_creator{std::make_unique<GridFactory<T>>(
109 this->m_simulation_config.getStringParameters(
"spatial_dimension"))};
112 this->m_field_map.insert(
113 {
"Temperature", std::valarray<double>(
114 this->m_simulation_config.getDoubleParameters(
"initial_temperature"),
115 this->m_simulation_config.getIntParameters(
"numerical_layers")
116 *
this->m_simulation_config.getIntParameters(
"number_of_facets"))});
118 std::vector<std::shared_ptr<GenericManagingModule<double>>>
all_modules{
120 std::vector<std::shared_ptr<GenericSubmodule<double>>>
all_submodules{
131 this->setInitChainStr();
132 m_global_chain.runChain(this->m_current_position);
Error class to throw when a module chain has circular or missing dependencies. Inherits from std::exc...
Definition ChainManager.h:28
static std::vector< std::shared_ptr< GenericSubmodule< T > > > createAllSubmodules(SimulationClassBase< T > *sim_pointer)
Creates every submodule in the submodule registry.
Definition ModuleFactory.h:165
static std::vector< std::shared_ptr< GenericManagingModule< T > > > createAllManagingModules(SimulationClassBase< T > *sim_pointer)
Creates every module in the module registry.
Definition ModuleFactory.h:146
Definition SimulationClassBase.h:15
Definition SimulationClassUnitTesting.h:22
SimulationClassUnitTesting()
Definition SimulationClassUnitTesting.h:87
int runInitChain()
Definition SimulationClassUnitTesting.h:129
void setAbsoluteDefaultIniPath()
Definition SimulationClassUnitTesting.h:45
void setUserIni(const std::string &user_ini) override
Definition SimulationClassUnitTesting.h:80
int run() override
Definition SimulationClassUnitTesting.h:100
~SimulationClassUnitTesting() override=default