Skip to content

Commit 7a4ee28

Browse files
author
Hadrien
committed
Allow Dynamical problem to have non diagonal noise
1 parent 0eaf97b commit 7a4ee28

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/solve.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,13 @@ function DiffEqBase.__init(
210210
end
211211
rateType = typeof(rate_prototype) ## Can be different if united
212212

213-
if prob.f isa DynamicalSDEFunction
214-
noise_rate_prototype = rate_prototype.x[1]
215-
elseif is_diagonal_noise(prob)
216-
noise_rate_prototype = rate_prototype
213+
214+
if is_diagonal_noise(prob)
215+
if prob.f isa DynamicalSDEFunction
216+
noise_rate_prototype = rate_prototype.x[1]
217+
else
218+
noise_rate_prototype = rate_prototype
219+
end
217220
elseif prob isa DiffEqBase.AbstractRODEProblem
218221
if prob isa DiffEqBase.AbstractSDEProblem
219222
noise_rate_prototype = copy(prob.noise_rate_prototype)

0 commit comments

Comments
 (0)