I ran into a problem today with the use of non-diagonal noise and not-in-place execution of the drift term and noise-coefficient. The problem seems to be on a subset of solvers including ImplicitEM(), SKenCarp() and SOSRA(), but working on solvers like EM(), EulerHeun() and RKMilGeneral().
A simplified code containing the problem
using StochasticDiffEq
function a_func(u,p,t)
du1 = -(p[1] * u[1] - p[2] * u[2])
du2 = -(p[1] * u[2] + p[2] * u[1])
return [du1,du2]
end
function b_func(u,p,t)
du11 = sqrt(2)*p[1] ; du12 = 0
du21 = sqrt(2)*p[2] ; du22 = 0
return [du11 du12
du21 du22]
end
Ks = [1.,0.]
prob = SDEProblem(a_func,b_func,[0.,0.],(0.0,0.02),Ks,
noise_rate_prototype=similar(Ks,2,2))
sol = solve(prob,ImplicitEM(theta=0.5), #EM()
dt=1e-2, saveat=0.01)
I ran into a problem today with the use of non-diagonal noise and not-in-place execution of the drift term and noise-coefficient. The problem seems to be on a subset of solvers including
ImplicitEM()
,SKenCarp()
andSOSRA()
, but working on solvers likeEM()
,EulerHeun()
andRKMilGeneral()
.A simplified code containing the problem
with stacktrace