diff --git a/Project.toml b/Project.toml index 05a34c8c3..14e1a1de0 100644 --- a/Project.toml +++ b/Project.toml @@ -29,10 +29,10 @@ JuMP = "1.28" LinearAlgebra = "1" LinearSolve = "3.54" MuladdMacro = "0.2.4" -OrdinaryDiffEqCore = "3.0.1" +OrdinaryDiffEqCore = "3.0.1, 4" RecipesBase = "1.3.4" Reexport = "1.2.2" -SciMLBase = "2.128" +SciMLBase = "2.128, 3" SparseArrays = "1" StaticArrays = "1.9.8" Statistics = "1" diff --git a/docs/Project.toml b/docs/Project.toml index f64d58287..72f7d35a2 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -25,21 +25,21 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [compat] BenchmarkTools = "1" Clarabel = "0.11" -DiffEqBase = "6.160" +DiffEqBase = "6.160, 7" DiffEqCallbacks = "4" -DiffEqDevTools = "2.45.1" +DiffEqDevTools = "2.45.1, 3" Documenter = "1" DoubleFloats = "1.4" InteractiveUtils = "1" JuMP = "1.28" LinearAlgebra = "1" LinearSolve = "3.7.1" -OrdinaryDiffEqFIRK = "1.7" -OrdinaryDiffEqLowOrderRK = "1.2" -OrdinaryDiffEqRosenbrock = "1.4" -OrdinaryDiffEqSDIRK = "1.2" -OrdinaryDiffEqTsit5 = "1.1" -OrdinaryDiffEqVerner = "1.1" +OrdinaryDiffEqFIRK = "1.7, 2" +OrdinaryDiffEqLowOrderRK = "1.2, 2" +OrdinaryDiffEqRosenbrock = "1.4, 2" +OrdinaryDiffEqSDIRK = "1.2, 2" +OrdinaryDiffEqTsit5 = "1.1, 2" +OrdinaryDiffEqVerner = "1.1, 2" Pkg = "1" Plots = "1" PrettyTables = "3" diff --git a/src/PositiveIntegrators.jl b/src/PositiveIntegrators.jl index eba70eb39..cb45f2c45 100644 --- a/src/PositiveIntegrators.jl +++ b/src/PositiveIntegrators.jl @@ -8,7 +8,7 @@ using SparseArrays: SparseArrays, AbstractSparseMatrix, SparseMatrixCSC, issparse, nonzeros, nzrange, rowvals, spdiagm using StaticArrays: SVector, SMatrix, StaticArray, StaticMatrix, @SVector, @SMatrix, MMatrix -using FastBroadcast: @.. +using FastBroadcast: @.., Serial using MuladdMacro: @muladd using Reexport: @reexport @@ -29,7 +29,6 @@ import SciMLBase: interp_summary using OrdinaryDiffEqCore: OrdinaryDiffEqAdaptiveAlgorithm, OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, - False, _vec import OrdinaryDiffEqCore: alg_order, isfsal, calculate_residuals, calculate_residuals!, diff --git a/src/mpdec.jl b/src/mpdec.jl index bda3fc247..934818b95 100644 --- a/src/mpdec.jl +++ b/src/mpdec.jl @@ -739,7 +739,7 @@ end # Now tmp stores error residuals calculate_residuals!(tmp, σ, uprev, u, integrator.opts.abstol, integrator.opts.reltol, integrator.opts.internalnorm, t, - False()) + Serial()) integrator.EEst = integrator.opts.internalnorm(tmp, t) end @@ -783,6 +783,6 @@ end # Now tmp stores error residuals calculate_residuals!(tmp, σ, uprev, u, integrator.opts.abstol, integrator.opts.reltol, integrator.opts.internalnorm, t, - False()) + Serial()) integrator.EEst = integrator.opts.internalnorm(tmp, t) end diff --git a/src/mprk.jl b/src/mprk.jl index 61b73a068..930e8c900 100644 --- a/src/mprk.jl +++ b/src/mprk.jl @@ -838,7 +838,7 @@ end # Now tmp stores error residuals calculate_residuals!(tmp, σ, uprev, u, integrator.opts.abstol, integrator.opts.reltol, integrator.opts.internalnorm, t, - False()) + Serial()) integrator.EEst = integrator.opts.internalnorm(tmp, t) end @@ -1275,7 +1275,7 @@ end # Now tmp2 stores error residuals calculate_residuals!(tmp2, tmp, uprev, u, integrator.opts.abstol, integrator.opts.reltol, integrator.opts.internalnorm, t, - False()) + Serial()) integrator.EEst = integrator.opts.internalnorm(tmp2, t) end diff --git a/src/sspmprk.jl b/src/sspmprk.jl index 17927806f..575a29b75 100644 --- a/src/sspmprk.jl +++ b/src/sspmprk.jl @@ -287,7 +287,7 @@ end # Now tmp stores error residuals calculate_residuals!(tmp, σ, uprev, u, integrator.opts.abstol, integrator.opts.reltol, integrator.opts.internalnorm, t, - False()) + Serial()) integrator.EEst = integrator.opts.internalnorm(tmp, t) end @@ -677,7 +677,7 @@ end # Now tmp2 stores error residuals calculate_residuals!(tmp2, tmp, uprev, u, integrator.opts.abstol, integrator.opts.reltol, integrator.opts.internalnorm, t, - False()) + Serial()) integrator.EEst = integrator.opts.internalnorm(tmp2, t) =# end diff --git a/src/utilities.jl b/src/utilities.jl index 7b2b241fe..dd49bfa70 100644 --- a/src/utilities.jl +++ b/src/utilities.jl @@ -159,7 +159,7 @@ function work_precision_fixed!(dict, prob, algs, labels, dts, alg_ref; error_time[i] = (Inf, Inf) try sol = solve(prob, alg; dt, adaptive = false, save_everystep = true) - if Int(sol.retcode) == 1 && isnonnegative(sol) + if SciMLBase.successful_retcode(sol) && isnonnegative(sol) error = compute_error(sol, ref_sol(sol.t)) time = compute_time_fixed(dt, prob, alg, seconds, numruns) @@ -240,7 +240,7 @@ function work_precision_adaptive!(dict, prob, algs, labels, abstols, reltols, al sol = solve(prob, alg; abstol, reltol, save_everystep = true, kwargs...) - if Int(sol.retcode) == 1 && isnonnegative(sol) + if SciMLBase.successful_retcode(sol) && isnonnegative(sol) error = compute_error(sol, ref_sol(sol.t)) time = compute_time_adaptive(abstol, reltol, prob, alg, seconds, numruns, kwargs...) diff --git a/test/Project.toml b/test/Project.toml index 09dbfc393..19b16d24d 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -15,6 +15,7 @@ OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" +SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" @@ -30,14 +31,15 @@ ExplicitImports = "1.0.1" JuMP = "1.28" LinearAlgebra = "1" LinearSolve = "3.54" -OrdinaryDiffEqLowOrderRK = "1.10" -OrdinaryDiffEqRosenbrock = "1.22" -OrdinaryDiffEqSDIRK = "1.11" -OrdinaryDiffEqTsit5 = "1.9" -OrdinaryDiffEqVerner = "1.10" +OrdinaryDiffEqLowOrderRK = "1.10, 2" +OrdinaryDiffEqRosenbrock = "1.22, 2" +OrdinaryDiffEqSDIRK = "1.11, 2" +OrdinaryDiffEqTsit5 = "1.9, 2" +OrdinaryDiffEqVerner = "1.10, 2" Plots = "1.38.9" RecipesBase = "1.3.4" RecursiveFactorization = "0.2.26" +SciMLBase = "2.128, 3" SparseArrays = "1" StaticArrays = "1.9.8" Statistics = "1" diff --git a/test/runtests.jl b/test/runtests.jl index 939239963..352c6cc1d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -15,6 +15,7 @@ using OrdinaryDiffEqSDIRK: ImplicitEuler, SDIRK2, TRBDF2 using OrdinaryDiffEqTsit5: Tsit5 using OrdinaryDiffEqVerner: Vern7, Vern9 using PositiveIntegrators +import SciMLBase using Clarabel using JuMP @@ -2375,7 +2376,7 @@ end # later versions of OrdinaryDiffEq.jl use dtmin = 0 by default, # see https://github.com/SciML/OrdinaryDiffEq.jl/pull/2098 sol = solve(prob, alg; dtmin = 0.0) - @test Int(sol.retcode) == 1 + @test SciMLBase.successful_retcode(sol) end end end @@ -2392,7 +2393,7 @@ end tspan = prob.tspan dt = (tspan[2] - tspan[1]) / 10 sol = solve(prob, alg; dt = dt) - @test Int(sol.retcode) == 1 + @test SciMLBase.successful_retcode(sol) end end end