imex_euler_step#
- class braintools.quad.imex_euler_step(f_exp, f_imp, y, t, *args, max_iter=2, **kwargs)#
First-order IMEX Euler step (explicit + drift-implicit).
Solves
y_{n+1} = y_n + dt * f_exp(y_n, t_n) + dt * f_imp(y_{n+1}, t_{n+1})by fixed-point iteration.
- Parameters:
f_exp (
Callable[[PyTree,Array|ndarray|bool|number|bool|int|float|complex|Quantity,Any],PyTree]) – Explicit (nonstiff) partf_exp(y, t, *args).f_imp (
Callable[[PyTree,Array|ndarray|bool|number|bool|int|float|complex|Quantity,Any],PyTree]) – Implicit (stiff) partf_imp(y, t, *args)evaluated implicitly at the end of the step.y (
PyTree) – Current state.t (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Current time.*args – Extra arguments forwarded to
f_expandf_imp.max_iter (
int) – Fixed‑point iterations for the implicit solve.
- Returns:
The updated state
y_{n+1}.- Return type:
PyTree