Skip to content

Commit

Permalink
no double copy
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Apr 10, 2017
1 parent 1b8008d commit 968537d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/integrators/integrator_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ end
if integrator.opts.save_idxs ==nothing
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u)
else
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u[integrator.opts.save_idxs])
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u[integrator.opts.save_idxs],Val{false})
end
if typeof(integrator.alg) <: Discrete || integrator.opts.dense
integrator.saveiter_dense +=1
Expand All @@ -104,7 +104,7 @@ end
if integrator.opts.save_idxs ==nothing
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,integrator.k)
else
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,[k[integrator.opts.save_idxs] for k in integrator.k])
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,[k[integrator.opts.save_idxs] for k in integrator.k],Val{false})
end
end
end
Expand All @@ -118,7 +118,7 @@ end
if integrator.opts.save_idxs == nothing
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u)
else
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u[integrator.opts.save_idxs])
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u[integrator.opts.save_idxs],Val{false})
end
copyat_or_push!(integrator.sol.t,integrator.saveiter,integrator.t)
if typeof(integrator.alg) <: Discrete || integrator.opts.dense
Expand All @@ -128,7 +128,7 @@ end
if integrator.opts.save_idxs == nothing
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,integrator.k)
else
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,[k[integrator.opts.save_idxs] for k in integrator.k])
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,[k[integrator.opts.save_idxs] for k in integrator.k],Val{false})
end
end
end
Expand All @@ -154,7 +154,7 @@ end
if integrator.opts.save_idxs == nothing
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u)
else
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u[integrator.opts.save_idxs])
copyat_or_push!(integrator.sol.u,integrator.saveiter,integrator.u[integrator.opts.save_idxs],Val{false})
end
if typeof(integrator.alg) <: Discrete || integrator.opts.dense
integrator.saveiter_dense +=1
Expand All @@ -163,7 +163,7 @@ end
if integrator.opts.save_idxs == nothing
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,integrator.k)
else
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,[k[integrator.opts.save_idxs] for k in integrator.k])
copyat_or_push!(integrator.sol.k,integrator.saveiter_dense,[k[integrator.opts.save_idxs] for k in integrator.k],Val{false})
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function init{uType,tType,isinplace,algType<:OrdinaryDiffEqAlgorithm,recompile_f
if save_idxs == nothing
copyat_or_push!(timeseries,1,u)
else
copyat_or_push!(timeseries,1,u[save_idxs])
copyat_or_push!(timeseries,1,u[save_idxs],Val{false})
end
copyat_or_push!(ks,1,[rate_prototype])
else
Expand Down

0 comments on commit 968537d

Please sign in to comment.