sde_implicit_euler_step#
- class braintools.quad.sde_implicit_euler_step(df, dg, y, t, *args, max_iter=2, **kwargs)#
Implicit (drift-implicit) Euler–Maruyama step solved with Newton’s method.
Solves
y_{n+1} = y_n + f(y_{n+1}, t_{n+1}) dt + g(y_n, t_n) dWfory_{n+1}with Newton iterations started fromy_n + g(y_n, t_n) dW.- Parameters:
- Returns:
The updated state
y_{n+1}.- Return type:
PyTree
Notes
The implicit drift equation is solved with Newton’s method, as in the IMEX steppers: with a dense Jacobian for states of up to 256 elements and matrix-free GMRES on Jacobian-vector products for larger states. The step is stable for stiff drifts of any
|∂f/∂y| dt.Diffusion is treated explicitly with
g(y_n, t_n) dW.