File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -210,10 +210,13 @@ function DiffEqBase.__init(
210
210
end
211
211
rateType = typeof (rate_prototype) # # Can be different if united
212
212
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
217
220
elseif prob isa DiffEqBase. AbstractRODEProblem
218
221
if prob isa DiffEqBase. AbstractSDEProblem
219
222
noise_rate_prototype = copy (prob. noise_rate_prototype)
@@ -287,7 +290,7 @@ function DiffEqBase.__init(
287
290
else
288
291
randElType = uBottomEltypeNoUnits # Strip units and type info
289
292
if prob. f isa DynamicalSDEFunction
290
- rand_prototype = copy (noise_rate_prototype)
293
+ rand_prototype = copy (rate_prototype . x[ 1 ]) # Noise is a vector of the same size than the number of variables
291
294
elseif is_diagonal_noise (prob)
292
295
if typeof (u) <: SArray
293
296
rand_prototype = zero (u) # TODO : Array{randElType} for units
You can’t perform that action at this time.
0 commit comments