To define an SDAE, you simply define an SDE Problem with the forcing function
f, the noise function
g, a mass matrix
M and the initial condition
u₀ which define the SDAE in mass matrix form:
g should be specified as
g(u,p,t) respectively, and
u₀ should be an AbstractArray whose geometry matches the desired geometry of
u. Note that we are not limited to numbers or vectors for
u₀; one is allowed to provide
u₀ as arbitrary matrices / higher dimension tensors as well. A vector of
gs can also be defined to determine an SDE of higher Ito dimension.
Nonsingular mass matrices correspond to constraint equations and thus a stochastic DAE.
const mm_A = [-2.0 1 4 4 -2 1 0 0 0] function f!(du,u,p,t) du = u du = u du = u + u + u - 1 end function g!(du,u,p,t) @. du = 0.1 end prob = SDEProblem(SDEFunction(f!,g!;mass_matrix=mm_A),g!, ones(3),(0.0,1.0))