diff --git a/.travis.yml b/.travis.yml index 4fb6e09..3deb3f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,7 @@ os: - osx - linux julia: - - 1.3 - - 1.4 + - 1.5 - nightly matrix: allow_failures: diff --git a/Project.toml b/Project.toml index 20959c0..7468f04 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Sundials" uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" authors = ["Chris Rackauckas "] -version = "4.2.6" +version = "4.3.0" [deps] CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" @@ -16,11 +16,11 @@ Sundials_jll = "fb77eaff-e24c-56d4-86b1-d163f2edb164" [compat] CEnum = "0.2, 0.3, 0.4" -DataStructures = "0.17.0, 0.18" -DiffEqBase = "6.21" +DataStructures = "0.18" +DiffEqBase = "6.44" Reexport = "0.2" Sundials_jll = "5.2" -julia = "1.3" +julia = "1" [extras] DiffEqOperators = "9fdde737-9c7f-55bf-ade8-46b3f136cc48" diff --git a/src/common_interface/integrator_types.jl b/src/common_interface/integrator_types.jl index 5d6408d..afe14c7 100644 --- a/src/common_interface/integrator_types.jl +++ b/src/common_interface/integrator_types.jl @@ -155,8 +155,9 @@ DiffEqBase.postamble!(integrator::AbstractSundialsIntegrator) = nothing @inline function DiffEqBase.step!(integrator::AbstractSundialsIntegrator) if integrator.opts.advance_to_tstop - while integrator.tdir*(integrator.t-DataStructures.top(integrator.opts.tstops)) < -1e6eps() - tstop = DataStructures.top(integrator.opts.tstops) + # The call to first is an overload of Base.first implemented in DataStructures + while integrator.tdir*(integrator.t-first(integrator.opts.tstops)) < -1e6eps() + tstop = first(integrator.opts.tstops) set_stop_time(integrator,tstop) integrator.tprev = integrator.t if !(typeof(integrator.opts.callback.continuous_callbacks)<:Tuple{}) @@ -174,7 +175,7 @@ DiffEqBase.postamble!(integrator::AbstractSundialsIntegrator) = nothing integrator.uprev .= integrator.u end if !isempty(integrator.opts.tstops) - tstop = DataStructures.top(integrator.opts.tstops) + tstop = first(integrator.opts.tstops) set_stop_time(integrator,tstop) solver_step(integrator,tstop) else diff --git a/src/common_interface/integrator_utils.jl b/src/common_interface/integrator_utils.jl index 5b93d98..c8561ea 100644 --- a/src/common_interface/integrator_utils.jl +++ b/src/common_interface/integrator_utils.jl @@ -38,8 +38,9 @@ function DiffEqBase.savevalues!(integrator::AbstractSundialsIntegrator,force_sav saved, savedexactly = false, false !integrator.opts.save_on && return saved, savedexactly uType = eltype(integrator.sol.u) + # The call to first is an overload of Base.first implemented in DataStructures while !isempty(integrator.opts.saveat) && - integrator.tdir*DataStructures.top(integrator.opts.saveat) < integrator.tdir*integrator.t + integrator.tdir*first(integrator.opts.saveat) < integrator.tdir*integrator.t saved = true curt = pop!(integrator.opts.saveat) diff --git a/src/common_interface/solve.jl b/src/common_interface/solve.jl index b4b3169..69ed5c1 100644 --- a/src/common_interface/solve.jl +++ b/src/common_interface/solve.jl @@ -1153,8 +1153,9 @@ function DiffEqBase.solve!(integrator::AbstractSundialsIntegrator) while !isempty(integrator.opts.tstops) # Sundials can have floating point issues approaching a tstop if # there is a modifying event each - while integrator.tdir*(integrator.t-DataStructures.top(integrator.opts.tstops)) < -1e6eps() - tstop = DataStructures.top(integrator.opts.tstops) + # The call to first is an overload of Base.first implemented in DataStructures + while integrator.tdir*(integrator.t-first(integrator.opts.tstops)) < -1e6eps() + tstop = first(integrator.opts.tstops) set_stop_time(integrator,tstop) integrator.tprev = integrator.t if !(typeof(integrator.opts.callback.continuous_callbacks)<:Tuple{}) @@ -1217,7 +1218,7 @@ end function handle_tstop!(integrator::AbstractSundialsIntegrator) tstops = integrator.opts.tstops if !isempty(tstops) - if integrator.tdir*(integrator.t-DataStructures.top(integrator.opts.tstops)) > -1e6eps() + if integrator.tdir*(integrator.t-first(integrator.opts.tstops)) > -1e6eps() pop!(tstops) t = integrator.t integrator.just_hit_tstop = true