Skip to content

Commit 2c3948d

Browse files
committed
deepcopy back to prob.noise
1 parent 36988e3 commit 2c3948d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/solve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ function DiffEqBase.__solve(prob::DiffEqBase.AbstractRODEProblem,
55
kwargs...) where recompile_flag
66
integrator = DiffEqBase.__init(prob,alg,timeseries,ts,recompile;kwargs...)
77
solve!(integrator)
8-
if typeof(prob) <: DiffEqBase.AbstractRODEProblem
9-
# better to make the following a function in DiffEqNoiseProcess
8+
if typeof(prob) <: DiffEqBase.AbstractRODEProblem && typeof(prob.noise) == typeof(integrator.sol.W)
9+
# would be better to make the following a function `noise_deepcopy!(W::T, Z::T) where {T <: AbstractNoiseProcess}` in `DiffEqNoiseProcess.jl`, but this should do it for the moment
1010
for x in fieldnames(typeof(prob.noise))
1111
setfield!(prob.noise, x, deepcopy(getfield(integrator.sol.W, x)))
1212
end

0 commit comments

Comments
 (0)