ODESolver

class probnum.diffeq.ODESolver(ivp, order)

Bases: abc.ABC

Interface for ODESolver.

Methods Summary

initialise()

Returns t0 and y0 (for the solver, which might be different to ivp.y0)

method_callback(time, current_guess, …)

Optional callback.

postprocess(odesol)

Process the ODESolution object before returning.

rvlist_to_odesol(times, rvs)

Create an ODESolution object.

solution_generator(steprule)

Generate ODE solver steps.

solve(steprule)

Solve an IVP.

step(start, stop, current, **kwargs)

Every ODE solver needs a step() method that returns a new random variable and an error estimate.

Methods Documentation

abstract initialise()[source]

Returns t0 and y0 (for the solver, which might be different to ivp.y0)

method_callback(time, current_guess, current_error)[source]

Optional callback.

Can be overwritten. Do this as soon as it is clear that the current guess is accepted, but before storing it. No return. For example: tune hyperparameters (sigma).

postprocess(odesol)[source]

Process the ODESolution object before returning.

abstract rvlist_to_odesol(times, rvs)[source]

Create an ODESolution object.

solution_generator(steprule)[source]

Generate ODE solver steps.

solve(steprule)[source]

Solve an IVP.

Parameters

steprule (StepRule) – Step-size selection rule, e.g. constant steps or adaptive steps.

abstract step(start, stop, current, **kwargs)[source]

Every ODE solver needs a step() method that returns a new random variable and an error estimate.