![]() |
MoCSI API Reference
|
Abstract base class for the submodules. Submodules are below managing modules and will only be run by them, not directly from the sim class. They can neither create fields (only access the local fields of their managing modules) nor alter elements in the sim class (they only posses a pointer to const). They can however also have an arbitrary number of submodules that they can execute themself when called. Their structure is otherwise a direct mirror of the managing modules. More...
#include <GenericSubmodule.h>


Public Member Functions | |
| GenericSubmodule () | |
| Constructor without arguments. Will be employed when using the static modules registry. | |
| virtual | ~GenericSubmodule ()=default |
| GenericSubmodule (const 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 > | getDependencies () const |
| std::vector< std::string > | getSubmoduleList () const |
| bool | isSetUp () |
| void | submodulesSetUp () |
| virtual std::string_view | getNameLocal () const =0 |
| virtual void | setFieldPtr (std::shared_ptr< std::valarray< T > > field_ptr) |
| 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 the field pointer of the managing module 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 | |
| ChainManager< GenericSubmodule< T > > | sub_module_chain |
| std::shared_ptr< std::valarray< T > > | module_field |
| const SimulationClassBase< T > * | sim {} |
| std::vector< std::string > | m_generic_submodules |
| InputManager | ini_file_data |
| bool | in_snapshot {false} |
| bool | in_output {false} |
| char | field_id |
| bool | is_set_up {false} |
Abstract base class for the submodules. Submodules are below managing modules and will only be run by them, not directly from the sim class. They can neither create fields (only access the local fields of their managing modules) nor alter elements in the sim class (they only posses a pointer to const). They can however also have an arbitrary number of submodules that they can execute themself when called. Their structure is otherwise a direct mirror of the managing modules.
|
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 |
Implemented in AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< T >.
|
inlinevirtual |
Reimplemented in AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< T >.
|
pure virtual |
Implemented in AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< T >.
|
inline |
Reimplemented in AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< T >.
|
inline |
Reimplemented in AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< T >.
|
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 AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< T >.
Reimplemented in AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< T >.
|
inlinevirtual |
Reimplemented in AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< 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.
|
inline |
Sets all the submodules of this module into their corresponding chains. Also sets their field-pointers to the field pointer of the managing module as a way to communicate between submodules.
|
inlinevirtual |
Reimplemented in AlbedoConstantCustom< T >, DensityConstantCustom< T >, DensityConstantGundlach2013RegolithSolidAsteroidType< T >, EmissivityConstantCustom< T >, HeatCapacityConstantCustom< T >, HeatCapacityConstantOpeil2010NonPorousRockSolidAsteroidType< T >, HeatCapacityVariableCustomPolynomial< T >, HeatConductivityConstantCustom< T >, HeatConductivityConstantMaxwell1873PorousRockSolid< T >, HeatConductivityTwoLayers< T >, HeatConductivityVariableGundlach2013NonPorousRockSolidAsteroidType< T >, HeatConductivityVariableGundlach2013RegolithSolid< T >, HeatConductivityVariableKiradjiev2019PorousRockSolidRadiation< T >, HeatSourceConstantCustom< T >, HeliocentricDistanceConstantCustom< T >, SolarFluxVariableCustomSinusoidal< T >, and SolarVectorConstantCustom< T >.
|
inline |
|
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 |