![]() |
MoCSI API Reference
|
Monitors and reports the simulation progress and iterations per second. More...
#include <RuntimeProgressTool.h>


Public Member Functions | |
| RuntimeProgressTool (SimulationClassBase< T > *sim) | |
| bool | setup (std::vector< std::shared_ptr< GenericSubmodule< T > > > all_submodules) override |
| bool | exec (std::string_view param) override |
| bool | init () override |
| bool | preTimeStep () override |
| bool | postNonLinIter () override |
| bool | postTimeStep () override |
| bool | output () override |
| void | checkProgress () |
| Calls progress update printing function when the given interval of time steps have passed. | |
| std::vector< std::string > | getChainInsertion () const override |
| std::string_view | getNameLocal () const override |
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 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) |
| static std::string | getName () |
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 |
Monitors and reports the simulation progress and iterations per second.
This managing module provides real-time feedback on the simulation runtime by calculating the number of iterations per second and printing progress updates to the console. It is particularly useful for long-running simulations to estimate remaining runtime and monitor performance.
Key Features:
| T | Numeric type used in the simulation (e.g., float, double) |
| RuntimeProgressTool< T >::RuntimeProgressTool | ( | SimulationClassBase< T > * | sim | ) |
| void RuntimeProgressTool< T >::checkProgress | ( | ) |
Calls progress update printing function when the given interval of time steps have passed.
| T | Numeric type used in the simulation (e.g., float, double). |
|
inlinestatic |
|
overridevirtual |
Implements GenericManagingModule< T >.
|
inlineoverridevirtual |
Reimplemented from GenericManagingModule< T >.
|
inlinestatic |
|
inlineoverridevirtual |
Implements GenericManagingModule< T >.
|
inlineoverridevirtual |
Reimplemented from GenericManagingModule< T >.
|
overridevirtual |
Reimplemented from GenericManagingModule< T >.
|
inlineoverridevirtual |
Reimplemented from GenericManagingModule< T >.
|
overridevirtual |
Reimplemented from GenericManagingModule< T >.
|
overridevirtual |
Reimplemented from GenericManagingModule< T >.
|
overridevirtual |
Reimplemented from GenericManagingModule< T >.