svIntegratorStrongStochasticRungeKuttaSRA
-
template<size_t numberStages>
struct SRACoefficients - #include <svIntegratorStrongStochasticRungeKuttaSRA.h>
Stores the coefficients for a Roessler Stochastic Runge-Kutta method for the strong approximation of SDEs with additive noise (an “SRA” method).
“Additive noise” means the diffusion \(g(t)\) does not depend on the state. The Butcher tableau of an
s-stage SRA method has the form (Roessler 2010):\[\begin{split} \begin{array}{c|cc} c^{(0)} & A^{(0)} & B^{(0)} \\ c^{(1)} & & \\ \hline & \alpha & \beta^{(1)}\ \beta^{(2)} \end{array} \end{split}\]where \(A^{(0)}, B^{(0)}\) are strictly-lower-triangular (so the method is explicit). Because the noise is additive there is only a single family of stages. See
svIntegratorStrongStochasticRungeKuttaSRAfor the recurrence.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
-
StageSizedMatrix B0 = {}
diffusion coefficient matrix (multiplies chi2 = I(1,0)/h)
-
StageSizedArray alpha = {}
drift weights
-
StageSizedArray beta1 = {}
diffusion weights multiplying dW
-
StageSizedArray beta2 = {}
diffusion weights multiplying chi2 = I(1,0)/h
-
StageSizedArray c0 = {}
“c0” node array; the row sums of A0: \(c^{(0)}_i = \sum_j A^{(0)}_{ij}\)
-
StageSizedArray c1 = {}
“c1” node array, used to evaluate the (state-independent) diffusion at the correct times: \(g(t_n + c^{(1)}_i h)\).
-
using StageSizedArray = std::array<double, numberStages>
-
template<size_t numberStages>
class svIntegratorStrongStochasticRungeKuttaSRA : public StochasticRKIntegratorBase - #include <svIntegratorStrongStochasticRungeKuttaSRA.h>
The svIntegratorStrongStochasticRungeKuttaSRA class implements a state integrator that provides strong (order up to 1.5) solutions to problems with stochastic dynamics (SDEs) that have additive noise (diffusion independent of the state).
The method is the Roessler “SRA” 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 Roessler
SRA1/SOSRAfamily. The recurrence below follows the genericSRAstep.With \(s\) stages, \(m\) noise sources, time step \(h\) and per-noise-source random variables \(\Delta W \sim N(0,h)\) and \(\chi_2 = (\Delta W + \Delta Z/\sqrt 3)/2\) (with \(\Delta Z \sim N(0,h)\) independent):
--- 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) --- state update --- y_{n+1} = y_n + h * sum_i alpha[i] f(t_n + c0[i] h, H0[i]) + sum_k [ (beta1 . g_k) dW[k] + (beta2 . g_k) chi2[k] ]where g_k is the (state-independent) diffusion for noise source k, evaluated at the stage times t_n + c1[i] h.
Warning
Stochastic integration is in beta.
Public Functions
-
svIntegratorStrongStochasticRungeKuttaSRA(DynamicObject *dynIn, const SRACoefficients<numberStages> &coefficients)
Creates an SRA 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 SRACoefficients<numberStages> coefficients
Coefficients to be used in the method
-
svIntegratorStrongStochasticRungeKuttaSRA(DynamicObject *dynIn, const SRACoefficients<numberStages> &coefficients)