sde_srk2_step

Contents

sde_srk2_step#

class braintools.quad.sde_srk2_step(df, dg, y, t, *args, **kwargs)#

Stochastic Runge–Kutta 2 (Heun) for Stratonovich SDEs.

Applies the deterministic RK2 (Heun) tableau to the combined Stratonovich increment f dt + g dW using a single Brownian increment dW shared across stages:

  • k1 = f(y, t) dt + g(y, t) dW

  • k2 = f(y + k1, t + dt) dt + g(y + k1, t + dt) dW

  • y_{n+1} = y + 0.5 (k1 + k2)

Parameters:
  • df (Callable[[PyTree, float | Quantity, ...], PyTree]) – Same semantics as other steppers. Interprets the SDE in Stratonovich sense.

  • dg (Callable[[PyTree, float | Quantity, ...], PyTree]) – Same semantics as other steppers. Interprets the SDE in Stratonovich sense.

  • y (PyTree) – Same semantics as other steppers. Interprets the SDE in Stratonovich sense.

  • t (float | Quantity) – Same semantics as other steppers. Interprets the SDE in Stratonovich sense.

  • *args – Same semantics as other steppers. Interprets the SDE in Stratonovich sense.

Returns:

The updated state y_{n+1}.

Return type:

PyTree