svStochasticIntegratorW2Ito

struct W2ItoCoefficients
#include <svStochasticIntegratorW2Ito.h>

Extended Butcher tableau for the Tang & Xiao weak-order-2 SRK family.

The coefficients characterise a specific member of the general weak-order-2 stochastic Runge-Kutta scheme for Ito SDEs. The number of stages \(s\) is inferred from the length of alpha. The tableau is

\[\begin{split} \begin{array}{c|c|c} & A^{(0)} & B^{(0)} \\ \hline & A^{(1)} & B^{(1)}\; B^{(2)} \\ \hline & \alpha & \beta^{(0)}\; \beta^{(1)} \end{array} \end{split}\]

with \(A^{(0)}, A^{(1)}, B^{(0)}, B^{(1)}, B^{(2)}\) strictly lower-triangular \(s\times s\) matrices (explicit method) and \(\alpha, \beta^{(0)}, \beta^{(1)}\) length- \(s\) weight vectors.

Public Functions

inline size_t numStages() const

Number of stages, inferred from the length of alpha.

inline double c0(size_t i) const

Drift stage node \(c^{(0)}_i = \sum_j A^{(0)}_{ij}\) (row sum of A0).

inline double c1(size_t i) const

Diffusion stage node \(c^{(1)}_i = \sum_j A^{(1)}_{ij}\) (row sum of A1).

Public Members

std::vector<double> alpha

drift weights, length s

std::vector<double> beta0

diffusion weights on the three-point increment, length s

std::vector<double> beta1

diffusion weights on the diagonal iterated integral, length s

std::vector<std::vector<double>> A0

drift-to-drift stage matrix, s x s

std::vector<std::vector<double>> B0

diffusion-to-drift stage matrix, s x s

std::vector<std::vector<double>> A1

drift-to-diffusion stage matrix, s x s

std::vector<std::vector<double>> B1

self-noise diffusion-to-diffusion stage matrix, s x s

std::vector<std::vector<double>> B2

cross-noise diffusion-to-diffusion stage matrix, s x s

class svStochasticIntegratorW2Ito : public StochasticRKIntegratorBase
#include <svStochasticIntegratorW2Ito.h>

The svStochasticIntegratorW2Ito class implements the Tang & Xiao efficient weak second-order (deterministic order 3+) Runge-Kutta family for Ito SDEs.

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

This is the shared base for the concrete W2Ito1 and W2Ito2 methods, which differ only in their coefficient tableau (see svStochasticIntegratorW2Ito1 and svStochasticIntegratorW2Ito2). It shares the pluggable noise-generator architecture of the other native stochastic integrators, so the same prescribed-noise test harness drives every method unchanged.

For an \(s\)-stage tableau the step (paper eq. 3.1) is

\[ y_{n+1} = y_n + \sum_i \alpha_i f(H^{(0)}_i)\,h + \sum_i \sum_k \beta^{(0)}_i g_k(H^{(k)}_i)\,\hat I_k + \sum_i \sum_k \beta^{(1)}_i g_k(H^{(k)}_i)\,\hat I_{(k,k)} \]

with drift stages \(H^{(0)}_i\) and per-noise-source diffusion stages \(H^{(k)}_i\). The driving random variables are a three-point increment \(\hat I_k \in \{\pm\sqrt{3h}, 0\}\) (from the Gaussian \(\Delta W_k\)), a two-point scale \(\xi = \eta_1\sqrt h\) (from the Gaussian \(\Delta Z_0\)), and the mixed iterated integrals \(\hat I_{(k,l)} = \tfrac12(\hat I_l \mp \eta_2 \hat I_l)\) for \(k\neq l\) (using a second two-point sign \(\eta_2\) from \(\Delta Z_1\)) and \(\hat I_{(k,k)} = \tfrac12(\hat I_k^2/\xi - \xi)\) on the diagonal. The step is explicit and derivative-free.

Warning

Stochastic integration is in beta.

Subclassed by svStochasticIntegratorW2Ito1, svStochasticIntegratorW2Ito2

Public Functions

virtual void integrate(double currentTime, double timeStep) override

Performs the integration of the associated dynamic objects up to time currentTime+timeStep

Protected Functions

svStochasticIntegratorW2Ito(DynamicObject *dyn, const W2ItoCoefficients &coefficients)

Constructor used by the concrete W2Ito methods, which supply their tableau.

ExtendedStateVector scaledSum(const std::vector<double> &factors, const std::vector<ExtendedStateVector> &vectors, size_t length)

Returns sum_{j<length} factors[j]*vectors[j] (skipping zero factors).

Protected Attributes

const W2ItoCoefficients coefficients

The extended Butcher tableau of the specific W2Ito method.