11#include "../../src/GenericManagingModule.h"
12#include "../../src/ModuleFactory.h"
32 static bool m_registered;
33 std::string m_ini_filepath{
"solar_vector/SolarVector.ini"};
38 bool exec(std::string_view
param)
override;
43 bool output()
override {
return true; };
54 return std::make_shared<SolarVector<T>>(
sim);
56 static std::string
getName() {
return "SolarVector"; };
57 std::string_view
getNameLocal()
const override {
return "SolarVector"; };
68 this->sim->m_simulation_config.getStringParameters(
"ini_folder_path")};
74 std::cerr <<
e.what() <<
'\n';
81 this->sim->m_field_map.insert({
"SolarVector", std::valarray<T>(3)});
82 this->module_field = std::make_shared<std::valarray<T>>(3);
91 if (
param ==
"InitChain")
95 if (
param ==
"PreTimeStepChain")
99 if (
param ==
"PostTimeStepChain")
101 return postTimeStep();
103 if (
param ==
"OutputChain")
113 this->sim->m_field_map[
"SolarVector"] = (*this->module_field);
119 this->sub_module_chain.runChain(
"PreTimeStepChain");
127 this->sub_module_chain.runChain(
"InitChain");
Concrete implementation of a matrix class representing a Compressed Sparse Rows (CSR) matrix....
Definition CsrMatrix.h:35
Abstract base class for the managing modules. Managing modules are the highest tier of modules and ar...
Definition GenericManagingModule.h:29
InputManager ini_file_data
Definition GenericManagingModule.h:38
SimulationClassBase< T > * sim
Definition GenericManagingModule.h:31
std::vector< std::string > m_generic_submodules
Definition GenericManagingModule.h:36
static constexpr bool registerModule(std::string name, creation_method module) noexcept
Function that adds a module to the module registry map.
Definition ModuleFactory.h:75
Definition SolarVector.h:30
std::string_view getNameLocal() const override
Definition SolarVector.h:57
static std::shared_ptr< GenericManagingModule< T > > createMethode(SimulationClassBase< T > *sim)
Definition SolarVector.h:52
static std::string getName()
Definition SolarVector.h:56
bool preTimeStep() override
Definition SolarVector.h:117
bool output() override
Definition SolarVector.h:43
bool setup(std::vector< std::shared_ptr< GenericSubmodule< T > > > all_submodules) override
Definition SolarVector.h:79
bool postTimeStep() override
Definition SolarVector.h:42
bool init() override
Definition SolarVector.h:125
SolarVector(SimulationClassBase< T > *sim)
Definition SolarVector.h:63
void writeToSim()
Definition SolarVector.h:111
bool exec(std::string_view param) override
Definition SolarVector.h:89
std::vector< std::string > getChainInsertion() const override
Definition SolarVector.h:47