ODESolver¶
-
class
probnum.diffeq.ODESolver(ivp, order)¶ Bases:
abc.ABCInterface for ODESolver.
Methods Summary
Returns t0 and y0 (for the solver, which might be different to ivp.y0)
method_callback(time, current_guess, …)Optional callback.
postprocess(times, rvs)Turn list of random variables into an ODE solution object and potentially do more.
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(times, rvs)[source]¶ Turn list of random variables into an ODE solution object and potentially do more. Overwrite for instance via.
>>> def postprocess(self, times, rvs): >>> # do something with times and rvs >>> odesol = super().postprocess(times, rvs) >>> # do something with odesol >>> return odesol
-
abstract