RestartModule#
- class fridom.framework.modules.restart_module.RestartModule(realtime_interval: timedelta64 | None = None, modeltime_interval: timedelta64 | None = None, iteration_interval: int | None = None, restart_command: str | None = None, filename: str = 'model', directory: str = 'restart')[source]#
Bases:
Module- __init__(realtime_interval: timedelta64 | None = None, modeltime_interval: timedelta64 | None = None, iteration_interval: int | None = None, restart_command: str | None = None, filename: str = 'model', directory: str = 'restart') None[source]#
Methods
__init__([realtime_interval, ...])disable()Enabling the module means that it will be executed at each time step.
enable()Enabling the module means that it will be executed at each time step.
is_enabled()Return whether the module is enabled or not.
reset()Stop and start the module.
setup(mset)Start the module
should_restart(mz)start()Start the module
stop()Stop the module
update(mz)Update the module
Attributes
diff_moduleThe differentiation module to be used by this module.
gridThe grid of the model settings
Return a dictionary with information about the time stepper.
interp_moduleThe interpolation module to be used by this module.
msetThe model settings
required_halo- name = 'Restart Module'#
- setup(mset: ModelSettingsBase) None[source]#
Start the module
Description#
This method is called by the ModelSettings.setup() and sets the ModelSettings as well as the differentiation and interpolation modules.
- should_restart(mz: ModelState) bool[source]#
- property info: dict#
Return a dictionary with information about the time stepper.
Description#
This method should be overridden by the child class to return a dictionary with information about the time stepper. This information is used to print the time stepper in the __repr__ method.
- log_level: fr.config.LogLevel | None#
- timer: fr.timing_module.TimingModule | None#