implementations.convergence_controller_classes.step_size_limiter module¶
- class StepSizeLimiter(controller, params, description, **kwargs)[source]¶
Bases:
ConvergenceControllerClass to set limits to adaptive step size computation during run time
Please supply dt_min or dt_max in the params to limit in either direction
- dependencies(controller, description, **kwargs)[source]¶
Load the slope limiter if needed.
- Parameters:
controller (pySDC.Controller) – The controller
description (dict) – The description object used to instantiate the controller
- Returns:
None
- get_new_step_size(controller, S, **kwargs)[source]¶
Enforce an upper and lower limit to the step size here. Be aware that this is only tested when a new step size has been determined. That means if you set an initial value for the step size outside of the limits, and you don’t do any further step size control, that value will go through. Also, the final step is adjusted such that we reach Tend as best as possible, which might give step sizes below the lower limit set here.
- Parameters:
controller (pySDC.Controller) – The controller
S (pySDC.Step) – The current step
- Returns:
None
- setup(controller, params, description, **kwargs)[source]¶
Define parameters here
- Parameters:
controller (pySDC.Controller) – The controller
params (dict) – The params passed for this specific convergence controller
description (dict) – The description object used to instantiate the controller
- Returns:
The updated params dictionary
- Return type:
(dict)
- class StepSizeRounding(controller, params, description, **kwargs)[source]¶
Bases:
ConvergenceControllerClass to round step size when using adaptive step size selection.
- get_new_step_size(controller, S, **kwargs)[source]¶
Round step size here
- Parameters:
controller (pySDC.Controller) – The controller
S (pySDC.Step) – The current step
- Returns:
None
- setup(controller, params, description, **kwargs)[source]¶
Define parameters here
- Parameters:
controller (pySDC.Controller) – The controller
params (dict) – The params passed for this specific convergence controller
description (dict) – The description object used to instantiate the controller
- Returns:
The updated params dictionary
- Return type:
(dict)
- class StepSizeSlopeLimiter(controller, params, description, **kwargs)[source]¶
Bases:
ConvergenceControllerClass to set limits to adaptive step size computation during run time
Please supply dt_slope_min or dt_slope_max in the params to limit in either direction. You can also supply dt_rel_min_slope in order to keep the old step size in case the relative change is smaller than this minimum.
- get_new_step_size(controller, S, **kwargs)[source]¶
Enforce an upper and lower limit to the slope of the step size here. The final step is adjusted such that we reach Tend as best as possible, which might give step sizes below the lower limit set here.
- Parameters:
controller (pySDC.Controller) – The controller
S (pySDC.Step) – The current step
- Returns:
None
- setup(controller, params, description, **kwargs)[source]¶
Define parameters here
- Parameters:
controller (pySDC.Controller) – The controller
params (dict) – The params passed for this specific convergence controller
description (dict) – The description object used to instantiate the controller
- Returns:
The updated params dictionary
- Return type:
(dict)