generate_w2ito_reference

Paper-faithful reference generator for the Tang & Xiao W2Ito1/W2Ito2 weak-order-2 SRK methods (Ito), from the primary source:

Tang, X., Xiao, A. “Efficient weak second-order stochastic Runge-Kutta methods for Ito stochastic differential equations”, BIT Numer. Math. 57, 241-260 (2017). https://doi.org/10.1007/s10543-016-0618-9

The StochasticDiffEq.jl reference library only provides W2Ito1 (there is no W2Ito2 in it), so W2Ito2’s multi-noise / non-commutative behaviour cannot be checked against Julia. This module implements the general SRK scheme (paper eq. 3.1) directly from the extended Butcher tableau (Tables 2 and 3), using the paper’s iterated-integral definitions (eq. 3.3), and writes trajectories for prescribed Gaussian increments. The Basilisk test replays the identical increments and must match.

The generator can also self-validate: python generate_w2ito_reference.py validate shows weak-order-2 convergence of E[X_T] on a linear Ito SDE with a known mean.

generate_w2ito_reference.w2ito_step(X, a, bcols, dWg, dZg, h, T)[source]

One W2Ito step (paper eq. 3.1) for a single sample.

X: (n,) state; a(x)->(n,) drift; bcols(x)->list of m columns (n,); dWg,dZg: (m,) Gaussian increments ~N(0,h); T: tableau dict.