![]() |
MoCSI API Reference
|
Managing module that calculates and manages surface albedo. More...
#include <Albedo.h>


Public Member Functions | |
| Albedo (SimulationClassBase< T > *sim) | |
| Construct the Albedo module. | |
| bool | setup (std::vector< std::shared_ptr< GenericSubmodule< T > > > all_submodules) override |
| Setup method called after construction. | |
| bool | exec (std::string_view param) override |
| Main execution method of the module. | |
| bool | init () override |
| Initialization step. | |
| bool | preTimeStep () override |
| Pre-time-step processing. | |
| bool | postTimeStep () override |
| Post-time-step processing. | |
| bool | output () override |
| Output stage. | |
| void | writeToSim () |
| Write the current albedo field to the simulation. | |
| std::vector< std::string > | getChainInsertion () const override |
| Get chain insertion points. | |
| std::string_view | getNameLocal () const override |
| Get the localized name of the module. | |
Public Member Functions inherited from GenericManagingModule< T > | |
| 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 | postNonLinIter () |
| virtual std::vector< std::string > | getDependencies () const |
| virtual void | setSubmoduleList (std::vector< std::string > submodules) |
| std::vector< std::string > | getSubmoduleList () const |
| 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. | |
Static Public Member Functions | |
| static std::shared_ptr< GenericManagingModule< T > > | createMethode (SimulationClassBase< T > *sim) |
| Factory method for creating an Albedo module. | |
| static std::string | getName () |
| Get the name of the module. | |
Additional Inherited Members | |
Protected Attributes inherited from GenericManagingModule< T > | |
| 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 |
Managing module that calculates and manages surface albedo.
The Albedo module is a managing module that:
.ini fileInit, PreTimeStep, PostTimeStep, Output)| T | Numeric type used in the simulation (e.g., float, double). |
Construct the Albedo module.
Loads user configuration from the .ini file and initializes the submodule list.
| sim | Pointer to the simulation base class. |
|
inlinestatic |
Factory method for creating an Albedo module.
Used by the ModuleFactory to dynamically create instances.
| sim | Pointer to the simulation base class. |
Main execution method of the module.
Dispatches calls to the corresponding chain stage based on the given parameter:
"InitChain""PreTimeStepChain""PostTimeStepChain""OutputChain"| param | String indicating which chain stage to run. |
Implements GenericManagingModule< T >.
Get chain insertion points.
Reads the list of chain stages where this module should be inserted from the .ini file parameter chain_insertion.
Reimplemented from GenericManagingModule< T >.
Get the name of the module.
Get the localized name of the module.
Implements GenericManagingModule< T >.
Initialization step.
Runs the submodule chain’s initialization stage and writes results to the simulation.
Reimplemented from GenericManagingModule< T >.
Output stage.
Currently does nothing except return success.
Reimplemented from GenericManagingModule< T >.
Post-time-step processing.
Currently does nothing except return success.
Reimplemented from GenericManagingModule< T >.
Pre-time-step processing.
Runs the submodule chain’s pre-time-step stage and writes results to the simulation.
Reimplemented from GenericManagingModule< T >.
|
overridevirtual |
Setup method called after construction.
Initializes the albedo field in the simulation’s field map and sets submodules.
| all_submodules | List of all available submodules. |
Reimplemented from GenericManagingModule< T >.
Write the current albedo field to the simulation.
Updates the simulation’s field map with the values from module_field.