ode_rk23_step#
- class braintools.quad.ode_rk23_step(f, y, t, *args, return_error=False, **kwargs)#
Bogacki–Shampine embedded Runge–Kutta 2(3) step (RK23).
- Parameters:
f (
Callable[[PyTree,float|Quantity,...],PyTree]) – Right-hand side functionf(y, t, *args) -> PyTree.y (
PyTree) – Current state at timet.t (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Current time.*args – Additional positional arguments forwarded to
f.return_error (
bool) – If True, also return a PyTree error estimate(y3 - y2).
- Returns:
The updated state (3rd-order). If
return_erroris True, returns(y_next, error_estimate).- Return type:
PyTree or tuple