svIntegratorStrongStochasticRungeKuttaSRI

template<size_t numberStages>
struct SRICoefficients
#include <svIntegratorStrongStochasticRungeKuttaSRI.h>

Stores the coefficients for a Roessler Stochastic Runge-Kutta method for the strong approximation of Ito SDEs with diagonal or scalar noise (an “SRI” method).

The Butcher tableau of an s-stage SRI method has the form (Roessler 2010):

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

where \(A^{(0)}, A^{(1)}, B^{(0)}, B^{(1)}\) are strictly-lower-triangular matrices (so the method is explicit) and the \(\beta^{(\cdot)}\) are the weight vectors that multiply the different random variables. See svIntegratorStrongStochasticRungeKuttaSRI for the exact recurrence.

See more in the description of svIntegratorStrongStochasticRungeKuttaSRI.

Public Types

using StageSizedArray = std::array<double, numberStages>

Array with size = numberStages

using StageSizedMatrix = std::array<StageSizedArray, numberStages>

Square matrix with size = numberStages

Public Members

StageSizedMatrix A0 = {}

drift coefficient matrix for the H0 stages

StageSizedMatrix A1 = {}

drift coefficient matrix for the H1 stages

StageSizedMatrix B0 = {}

diffusion coefficient matrix for the H0 stages

StageSizedMatrix B1 = {}

diffusion coefficient matrix for the H1 stages

StageSizedArray alpha = {}

drift weights

StageSizedArray beta1 = {}

diffusion weights multiplying dW

StageSizedArray beta2 = {}

diffusion weights multiplying I(1,1)/sqrt(h)

StageSizedArray beta3 = {}

diffusion weights multiplying I(1,0)/h

StageSizedArray beta4 = {}

diffusion weights multiplying I(1,1,1)/h

StageSizedArray c0 = {}

“c0” node array; the row sums of A0: \(c^{(0)}_i = \sum_j A^{(0)}_{ij}\)

StageSizedArray c1 = {}

“c1” node array; the row sums of A1: \(c^{(1)}_i = \sum_j A^{(1)}_{ij}\)

template<size_t numberStages>
class svIntegratorStrongStochasticRungeKuttaSRI : public StochasticRKIntegratorBase
#include <svIntegratorStrongStochasticRungeKuttaSRI.h>

The svIntegratorStrongStochasticRungeKuttaSRI class implements a state integrator that provides strong (order 1.5) solutions to problems with stochastic dynamics (SDEs) that have diagonal or scalar noise.

The method is the Roessler “SRI” family, described in:

Roessler A., "Runge-Kutta Methods for the Strong Approximation of Solutions of
Stochastic Differential Equations", SIAM J. Numer. Anal., 48 (3), pp. 922-952.
https://doi.org/10.1137/09076636X

This is an implementation of the SRIW1/SOSRI family of Roessler SRI methods. The recurrence below is the (unrolled) SRIW1/four-stage-SRI step.

As with the other Basilisk stochastic integrators, the method is written for autonomous systems (where f and g do not depend explicitly on time). Basilisk supports non-autonomous systems by treating time as an extra state (with drift 1 and diffusion 0), which is why the drift stages are evaluated at the shifted times \(t_n + c^{(0)}_i h\) and the diffusion stages at \(t_n + c^{(1)}_i h\).

With \(s\) stages, \(m\) (diagonal) noise sources, time step \(h\) and per-noise-source random variables:

\[ \hat{I}_{(1)} = \Delta W, \quad \chi_1 = \frac{\Delta W^2 - h}{2\sqrt h}, \quad \chi_2 = \frac{\Delta W + \Delta Z/\sqrt 3}{2}, \quad \chi_3 = \frac{\Delta W^3 - 3 \Delta W\,h}{6 h}, \]

(where \(\Delta W \sim N(0,h)\) and \(\Delta Z \sim N(0,h)\) is an independent Wiener increment), the method computes, for each noise source \(k\):

--- stage definitions (explicit; sums run over j = 1..i-1) ---
for i = 1..s:
    H0[i] = y_n + h  * sum_j A0[i][j] f(t_n + c0[j] h, H0[j])
                +      sum_j B0[i][j] chi2[k] g_k(t_n + c1[j] h, H1[j])
    H1[i] = y_n + h  * sum_j A1[i][j] f(t_n + c0[j] h, H0[j])
                + sqrt(h) sum_j B1[i][j] g_k(t_n + c1[j] h, H1[j])

--- state update ---
y_{n+1} = y_n + h * sum_i alpha[i] f(t_n + c0[i] h, H0[i])
              +     sum_i ( beta1[i] dW[k] + beta2[i] chi1[k] ) g_k(t_n + c1[i] h, H1[i])
              +     sum_i ( beta3[i] chi2[k] + beta4[i] chi3[k] ) g_k(t_n + c1[i] h, H1[i])

Note that the H0 (drift) stages are shared across noise sources, while the H1 (diffusion) stages are computed independently for each noise source \(k\) (this is what restricts the method to diagonal/scalar noise: each state is driven by its own noise source through its own diffusion stage).

Warning

Stochastic integration is in beta.

Public Functions

svIntegratorStrongStochasticRungeKuttaSRI(DynamicObject *dynIn, const SRICoefficients<numberStages> &coefficients)

Creates an SRI integrator for the given DynamicObject using the passed coefficients.

virtual void integrate(double currentTime, double timeStep) override

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

Protected Functions

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

Utility: result = sum_{i=0}^{length-1} factors[i] * vectors[i].

Protected Attributes

const SRICoefficients<numberStages> coefficients

Coefficients to be used in the method