AdaptiveSteps

class probnum.diffeq.stepsize.AdaptiveSteps(firststep, atol, rtol, limitchange=(0.2, 10.0), safetyscale=0.95, minstep=1e-15, maxstep=1000000000000000.0)

Bases: StepRule

Adaptive step-size selection (using proportional control).

Parameters

Methods Summary

errorest_to_norm(errorest, reference_state)

Computes the norm of error per tolerance (usually referred to as 'E').

is_accepted(scaled_error)

Check if the proposed step should be accepted or not.

suggest(laststep, scaled_error[, localconvrate])

Suggest a new step h_{n+1} given error estimate e_n at step h_n.

Methods Documentation

errorest_to_norm(errorest, reference_state)[source]

Computes the norm of error per tolerance (usually referred to as ‘E’).

The norm is usually the current error estimate normalised with atol, rtol, and the magnitude of the previous states. If this is smaller than 1, the step was small enough.

Parameters
is_accepted(scaled_error)[source]

Check if the proposed step should be accepted or not.

Variable “proposedstep” not used yet, but may be important in the future, e.g. if we decide that instead of tol_per_step (see AdaptiveSteps) we want to be able to control tol_per_unitstep.

Parameters

scaled_error (Union[float, Real, floating]) –

suggest(laststep, scaled_error, localconvrate=None)[source]

Suggest a new step h_{n+1} given error estimate e_n at step h_n.

Parameters