ODESolver

class probnum.diffeq.ODESolver(steprule, order)

Bases: abc.ABC

Interface for ODE solvers in ProbNum.

Methods Summary

attempt_step(state, dt)

Compute a step from the current state to the next state with increment dt.

initialize(ivp)

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

method_callback(state)

Optional callback.

perform_full_step(state, initial_dt)

Perform a full ODE solver step.

postprocess(odesol)

Process the ODESolution object before returning.

rvlist_to_odesol(times, rvs)

Create an ODESolution object.

solution_generator(ivp[, stop_at, callbacks])

Generate ODE solver steps.

solve(ivp[, stop_at, callbacks])

Solve an IVP.

Methods Documentation

abstract attempt_step(state, dt)[source]

Compute a step from the current state to the next state with increment dt.

This does not include the acceptance/rejection decision from the step-size selection. Therefore, if dt turns out to be too large, the result of attempt_step() will be discarded.

abstract initialize(ivp)[source]

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

method_callback(state)[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).

perform_full_step(state, initial_dt)[source]

Perform a full ODE solver step.

This includes the acceptance/rejection decision as governed by error estimation and steprule.

postprocess(odesol)[source]

Process the ODESolution object before returning.

abstract rvlist_to_odesol(times, rvs)[source]

Create an ODESolution object.

solution_generator(ivp, stop_at=None, callbacks=None)[source]

Generate ODE solver steps.

solve(ivp, stop_at=None, callbacks=None)[source]

Solve an IVP.

Parameters