Skip to content

Commit c71e598

Browse files
DEDataArray saveat fix
1 parent 788474d commit c71e598

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
julia 0.5
2-
Parameters 0.5.0 0.6.0
2+
Parameters 0.5.0
33
DiffEqBase 0.11.0
44
RecursiveArrayTools 0.2.0
55
DataStructures 0.4.6

src/integrators/integrator_utils.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@ end
7575
if integrator.opts.saveat!=integrator.t # If <t, interpolate
7676
Θ = (curt - integrator.tprev)/integrator.dt
7777
val = sde_interpolant(Θ,integrator,indices(integrator.uprev),Val{0}) # out of place, but force copy later
78+
if eltype(integrator.sol.u) <: DEDataArray
79+
save_val = copy_non_array_fields(integrator.uprev,val)
80+
else
81+
save_val = val
82+
end
7883
copyat_or_push!(integrator.sol.t,integrator.saveiter,curt)
79-
copyat_or_push!(integrator.sol.u,integrator.saveiter,val,Val{false})
84+
copyat_or_push!(integrator.sol.u,integrator.saveiter,save_val,Val{false})
8085
if typeof(integrator.alg) <: StochasticEqCompositeAlgorithm
8186
copyat_or_push!(integrator.sol.alg_choice,integrator.saveiter,integrator.cache.current)
8287
end

0 commit comments

Comments
 (0)