imex_euler_step

Contents

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})

for y_{n+1} with Newton’s method.

Parameters:
  • f_exp (Callable[..., PyTree]) – Explicit (nonstiff) part f_exp(y, t, *args).

  • f_imp (Callable[..., PyTree]) – Implicit (stiff) part f_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_exp and f_imp.

  • max_iter (int) – Newton iterations for the implicit solve. One iteration is exact when f_imp is linear in y.

Returns:

The updated state y_{n+1}.

Return type:

PyTree