Skip to content

Commit

Permalink
final depwarn fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed May 3, 2017
1 parent cec21b3 commit a10a8fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
18 changes: 1 addition & 17 deletions src/integrators/type.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,7 @@ type ODEIntegrator{algType<:OrdinaryDiffEqAlgorithm,uType,tType,tTypeNoUnits,tdi
fsalfirst::rateType
fsallast::rateType

if VERSION < v"0.6-"

ODEIntegrator(sol,u,k,t,dt,f,uprev,uprev2,tprev,
alg,rate_prototype,notsaveat_idxs,dtcache,dtchangeable,dtpropose,tdir,
EEst,qold,q11,
iter,saveiter,saveiter_dense,prog,cache,
kshortsize,just_hit_tstop,accept_step,isout,reeval_fsal,u_modified,opts) = new(
sol,u,k,t,dt,f,uprev,uprev2,tprev,
alg,rate_prototype,notsaveat_idxs,dtcache,dtchangeable,dtpropose,tdir,
EEst,qold,q11,
iter,saveiter,saveiter_dense,prog,cache,
kshortsize,just_hit_tstop,accept_step,isout,reeval_fsal,u_modified,opts) # Leave off fsalfirst and last

else

function (::Type{ODEIntegrator{algType,uType,tType,tTypeNoUnits,tdirType,ksEltype,SolType,
function (::Type{ODEIntegrator{algType,uType,tType,tTypeNoUnits,tdirType,ksEltype,SolType,
rateType,F,ProgressType,CacheType,O}}){algType,uType,tType,tTypeNoUnits,tdirType,ksEltype,SolType,
rateType,F,ProgressType,CacheType,O}(sol,u,k,t,dt,f,uprev,uprev2,tprev,
alg,rate_prototype,notsaveat_idxs,dtcache,dtchangeable,dtpropose,tdir,
Expand All @@ -101,7 +86,6 @@ type ODEIntegrator{algType<:OrdinaryDiffEqAlgorithm,uType,tType,tTypeNoUnits,tdi
EEst,qold,q11,
iter,saveiter,saveiter_dense,prog,cache,
kshortsize,just_hit_tstop,accept_step,isout,reeval_fsal,u_modified,opts) # Leave off fsalfirst and last
end
end
end

Expand Down
15 changes: 11 additions & 4 deletions test/iterator_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,17 @@ integrator([1.0;2.0])


integrator = init(prob,RK4();dt=1//2^(9))
for i in Base.Iterators.take(integrator,12) end
@test integrator.iter == 12
for i in Base.Iterators.take(integrator,12) end
@test integrator.iter == 24
if VERSION < v"0.6-"

This comment has been minimized.

Copy link
@tkelman

tkelman May 4, 2017

Contributor

should be more specific, JuliaLang/julia@333ad95
or use Compat.Iterators

for i in take(integrator,12) end
@test integrator.iter == 12
for i in take(integrator,12) end
@test integrator.iter == 24
else
for i in Base.Iterators.take(integrator,12) end
@test integrator.iter == 12
for i in Base.Iterators.take(integrator,12) end
@test integrator.iter == 24
end

integrator = init(prob_ode_2Dlinear,Tsit5();dt=1//2^(4),tstops=[0.5],advance_to_tstop=true,stop_at_next_tstop=true)
for (t,u) in tuples(integrator)
Expand Down

0 comments on commit a10a8fb

Please sign in to comment.