dde_heun_pc_step

Contents

dde_heun_pc_step#

class braintools.quad.dde_heun_pc_step(f, y, t, history_fn, delays, *args, max_iter=3, **kwargs)#

Heun predictor-corrector method for delay differential equations.

Uses explicit Heun as predictor and implicit trapezoidal rule as corrector.

Parameters:
  • f (Callable[[Array | ndarray | bool | number | bool | int | float | complex | Quantity, PyTree, PyTree, ...], PyTree]) – Same as dde_euler_step.

  • y (PyTree) – Same as dde_euler_step.

  • t (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Same as dde_euler_step.

  • history_fn (Callable[[Array | ndarray | bool | number | bool | int | float | complex | Quantity], PyTree]) – Same as dde_euler_step.

  • delays (Array | ndarray | bool | number | bool | int | float | complex | Quantity | Sequence[Array | ndarray | bool | number | bool | int | float | complex | Quantity]) – Same as dde_euler_step.

  • *args – Same as dde_euler_step.

  • max_iter (int) – Maximum number of corrector iterations.

Returns:

The updated state after Heun predictor-corrector step.

Return type:

PyTree

Notes

Higher-order predictor-corrector method that combines the stability of implicit methods with good accuracy. The corrector equation is:

y_{n+1} = y_n + h/2*[f(t_n, y_n, y(t_n-τ)) + f(t_{n+1}, y_{n+1}, y(t_{n+1}-τ))]