![]() |
MoCSI API Reference
|
Abstract base class for the managing modules. Managing modules are the highest tier of modules and are always run directly from the main loop. They can create a field and directly alter values within the simulation class . They can have an arbitrary number of submodules that they can execute themself when called. Each managing module can do different things during different times in the code managed via the chain insertion points and the corresponding functions in this class (Note: The internal "module_field" variable and the field they create in the sim class is NOT synced. You have to manually update the fields.) More...
#include <GenericManagingModule.h>


Public Member Functions | |
| GenericManagingModule () | |
| Constructor without arguments. Will be employed when using the static modules registry. | |
| virtual | ~GenericManagingModule ()=default |
| GenericManagingModule (SimulationClassBase< T > *l_sim) | |
| Constructor to be preferably used when a module is created during runtime. | |
| virtual bool | setup (std::vector< std::shared_ptr< GenericSubmodule< T > > > all_submodules) |
| virtual bool | exec (std::string_view param)=0 |
| virtual bool | init () |
| virtual bool | preTimeStep () |
| virtual bool | postTimeStep () |
| virtual bool | postNonLinIter () |
| virtual bool | output () |
| virtual std::vector< std::string > | getChainInsertion () const |
| virtual std::vector< std::string > | getDependencies () const |
| virtual void | setSubmoduleList (std::vector< std::string > submodules) |
| std::vector< std::string > | getSubmoduleList () const |
| virtual std::string_view | getNameLocal () const =0 |
| void | setSimPointer (SimulationClassBase< T > *sim) |
| Setter function for the sim pointer. As the module is usually registered during static initialization when the sim class is not yet existing, this function is needed to set the pointer. | |
| void | setSubmodules (std::vector< std::shared_ptr< GenericSubmodule< T > > > all_submodules) |
| Sets all the submodules of this module into their corresponding chains. Also sets their field-pointers to this->module_field as a way to communicate between submodules. | |
| void | writeToGlobalIniContent (std::ofstream &global_stream) |
| Function that writes the local ini file contents to the global ini file stream. "Tags" the keys with the name of the module in the format "module_name$key". | |
| void | overwriteLocalIniContent (const std::unordered_map< std::string, std::any > &global_ini_content) |
| Writes the (already trimmed to the local content) data from the global ini file to the local ini file. This only overwrites the internal data and not the file contents itself. | |
Protected Attributes | |
| SimulationClassBase< T > * | sim {} |
| std::shared_ptr< std::valarray< T > > | module_field |
| ChainManager< GenericSubmodule< T > > | sub_module_chain |
| std::vector< std::string > | m_generic_submodules |
| InputManager | ini_file_data |
| bool | in_snapshot {false} |
| bool | in_output {false} |
| char | field_id |
Abstract base class for the managing modules. Managing modules are the highest tier of modules and are always run directly from the main loop. They can create a field and directly alter values within the simulation class . They can have an arbitrary number of submodules that they can execute themself when called. Each managing module can do different things during different times in the code managed via the chain insertion points and the corresponding functions in this class (Note: The internal "module_field" variable and the field they create in the sim class is NOT synced. You have to manually update the fields.)
|
inline |
Constructor without arguments. Will be employed when using the static modules registry.
|
virtualdefault |
|
inline |
Constructor to be preferably used when a module is created during runtime.
| l_sim | The pointer to the sim class. |
|
pure virtual |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in SolarFlux< T >.
|
pure virtual |
|
inline |
|
inline |
Writes the (already trimmed to the local content) data from the global ini file to the local ini file. This only overwrites the internal data and not the file contents itself.
| global_ini_content | The map containing the local partition of this module within the global ini file. |
Reimplemented in FluxSmoothingTool< T >, OutputCsvTool< T >, and RuntimeProgressTool< T >.
|
inline |
Setter function for the sim pointer. As the module is usually registered during static initialization when the sim class is not yet existing, this function is needed to set the pointer.
|
inlinevirtual |
|
inline |
Sets all the submodules of this module into their corresponding chains. Also sets their field-pointers to this->module_field as a way to communicate between submodules.
|
inlinevirtual |
|
inline |
Function that writes the local ini file contents to the global ini file stream. "Tags" the keys with the name of the module in the format "module_name$key".
| global_stream | The outstream containing all ini file data. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |