generate_dri1_reference

Paper-faithful reference for the DRI1 (Debrabant-Roessler) weak-order-2 Ito integrator with genuinely NON-COMMUTATIVE noise.

Why not the Julia reference: StochasticDiffEq.jl’s DRI1 non-diagonal (matrix-noise) branch raises an UndefVarError (an l/k loop-variable mix-up in its non-diagonal code path), so it cannot solve a coupled-noise DRI1 problem at all. The diagonal path works and is covered by the Julia test, but that path only weakly exercises the mixed-integral cross-terms. To test DRI1’s headline capability - non-commutative noise - we implement DRI1 directly, generalized to vector-valued diffusion columns, transcribed from the DRI1 constant-cache perform_step.

The oracle is validated (see validate()) to reproduce weak order 2 on a non-commutative linear Ito SDE with a known mean E[X_T] = expm(A T) X0. As elsewhere the Gaussian increments are prescribed so the Basilisk test can replay them exactly.

Run: python3 generate_dri1_reference.py (writes data/dri1_reference_trajectories.json)

python3 generate_dri1_reference.py validate (weak-order check)