Extending exponax-spde with New SPDE Steppers¶
New equation classes inherit the private _BaseStochasticStepper and their
deterministic counterpart from the public exponax API. See
StochasticBurgers for a scalar
nonlinear example and
StochasticDiffusion for exact linear
drift. Keep exponax's constructor parameters and defaults, with drift order 1
where exponax exposes order, and add keyword-only sigma and noise_alpha.
- Put
_BaseStochasticStepperfirst in the inheritance list. Initialise the upstream drift throughsuper().__init__. - For a real diagonal scalar symbol, call
self._prepare_additive_noise(sigma, noise_alpha)after construction of the drift. This computes the symbol through the equation's documented_build_linear_operatorhook and supplies it to the shared noise initialiser. Keep validation and equation-specific warnings at construction. - Add the class to both public namespaces. Register the stochastic and
deterministic factories, supported drift orders and an independent symbol
in
tests/test_stochastic/_registry.py. The shared contracts exercise deterministic parity, exact modal power, keyed replay, coarsening, JIT, VMAP, gradients, float32 and coupled paths. Add tests for the equation's separate analytic laws. - Document the supported geometry, covariance and continuum assumptions. See the regularity screens.
Allen–Cahn supplies its own drift hooks so that
TamedPolynomialNonlinearFun can apply optional taming. Its existing
constructor also exposes multiplicative Euler–Maruyama and Milstein.
Multiplicative increments¶
Draw a σ-free Wiener increment by transforming a real Gaussian field. Multiply the physical increment by the step-start field at each grid point and propagate its FFT with the linear exponential. Dealias the deterministic nonlinearity only. For a Milstein correction, centre the squared Wiener increment by its scalar point variance and apply the same propagator. Coarse steps sum the fine Wiener increments before computing the product or correction. The noise model gives the formulas and regularity requirement.
Use equinox.filter_jit or a JIT-compiled closure over the stepper.
The test extra includes physverify for checking host-side NumPy errors
after the JAX solve.