RungeKutta#
- class fridom.framework.time_steppers.RungeKutta(dt: timedelta64 | float = 1, method: RKMethods = RKMethods.RK4, max_dt: timedelta64 | float | None = None, tol=1e-06)[source]#
Bases:
TimeStepper- __init__(dt: timedelta64 | float = 1, method: RKMethods = RKMethods.RK4, max_dt: timedelta64 | float | None = None, tol=1e-06)[source]#
Methods
__init__([dt, method, max_dt, tol])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
start()Start the module
stop()Stop the module
time_discretization_effect(omega)Compute the time discretization effect on a frequency.
update(mz)Update the model state to the next time level.
Attributes
diff_moduleThe differentiation module to be used by this module.
dtTime step size.
gridThe grid of the model settings
infoReturn a dictionary with information about the time stepper.
interp_moduleThe interpolation module to be used by this module.
Time step size.
msetThe model settings
required_haloExamples using
fridom.framework.time_steppers.RungeKutta#- name = 'Runge-Kutta'#
- 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.
- calculate_tendency(mz: ModelState) StateBase[source]#
- update(mz: ModelState) None[source]#
Update the model state to the next time level.
Parameters#
- mzModelState
Model state.
- property max_dt: timedelta64#
Time step size.