solve_ivp_abm

Contents

solve_ivp_abm#

solve_ivp_abm(fun, t_span, y0, Nt, ys=None, dys=None, dcp=None, save_memory=False, start_factor=2)#

Solve the specified IVP using a 5th order predictor-corrector method.

This is the algorithm presented at the end of Section 23.10 of Hamming’s book. It is an average of the Milne and Adams-Bashforth cases.

Parameters:
  • Nt (int) – Number of steps. The time-step will be np.diff(t_span)/Nt.

  • ys ([y0, y1, y2, y3] or None) – First four steps to get the process started. If not provided, then these will be computed using solve_ivp_rk4().

  • dys ([dy0, dy1, dy2, dy3] or None) – Derivatives at the corresponding previous steps. Will be computed if not provided.

  • dcp (array, None) – Previous corrector-predictor difference (with a factor 161/170).

  • save_memory (bool) – If True, then only keep the last four steps.

Returns:

  • res (OdeResult) – Bunch object.

  • The remaining arguments should match those of scipy.integrate.solve_ivp().

  • Don’t worry about optimizations like allowing fun to be vectorized etc.

Notes

This method requires four initial values to get started.