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 via fixed-point iteration.
Solves
y_{n+1} = y_n + f(y_{n+1}, t_{n+1}) dt + g(y_n, t_n) dWusing a few fixed-point iterations starting from an explicit predictor.- Parameters:
df (
Callable[[PyTree,float|Quantity,...],PyTree]) – Drift functionf(y, t, *args).dg (
Callable[[PyTree,float|Quantity,...],PyTree]) – Diffusion functiong(y, t, *args).y (
PyTree) – Current state.t (
float|Quantity) – Current time.*args – Extra arguments forwarded to
dfanddg.max_iter (
int) – Number of fixed-point iterations for the implicit corrector.
- Returns:
The updated state
y_{n+1}.- Return type:
PyTree
Notes
Uses a simple Picard iteration; for stiff problems increase
max_iteror provide a more robust nonlinear solver.Diffusion is treated explicitly with
g(y_n, t_n) dW.