Skip to content

Commit aa5d779

Browse files
github-actions[bot]CompatHelper JuliaJoshuaLampert
authored
CompatHelper: bump compat for SciMLBase to 3, (keep existing compat) (#194)
* CompatHelper: bump compat for SciMLBase to 3, (keep existing compat) * allow new versions * allow v2 of all OrdinaryDiffEq*.jl packages * migrate to new versions * bump compat for OrdinaryDiffEqCore to v4.2 * only allow new versions * OrdinaryDiffEqFIRK * use set_EEst! * bump versions according to Downgrade CI * bump more compats for Downgrade * import SciMLBase * fix length * bump compat of SciMLBase.jl to v3.7 to fix Downgrade --------- Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org> Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
1 parent f977ba8 commit aa5d779

9 files changed

Lines changed: 53 additions & 51 deletions

File tree

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
2424
JuMPExt = "JuMP"
2525

2626
[compat]
27-
FastBroadcast = "0.3.5, 1"
27+
FastBroadcast = "1.3"
2828
JuMP = "1.28"
2929
LinearAlgebra = "1"
30-
LinearSolve = "3.54"
30+
LinearSolve = "3.75"
3131
MuladdMacro = "0.2.4"
32-
OrdinaryDiffEqCore = "3.0.1"
32+
OrdinaryDiffEqCore = "4.2"
3333
RecipesBase = "1.3.4"
3434
Reexport = "1.2.2"
35-
SciMLBase = "2.128"
35+
SciMLBase = "3.7"
3636
SparseArrays = "1"
3737
StaticArrays = "1.9.8"
3838
Statistics = "1"

docs/Project.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2525
[compat]
2626
BenchmarkTools = "1"
2727
Clarabel = "0.11"
28-
DiffEqBase = "6.160"
28+
DiffEqBase = "7"
2929
DiffEqCallbacks = "4"
30-
DiffEqDevTools = "2.45.1"
30+
DiffEqDevTools = "3"
3131
Documenter = "1"
3232
DoubleFloats = "1.4"
3333
InteractiveUtils = "1"
3434
JuMP = "1.28"
3535
LinearAlgebra = "1"
3636
LinearSolve = "3.7.1"
37-
OrdinaryDiffEqFIRK = "1.7"
38-
OrdinaryDiffEqLowOrderRK = "1.2"
39-
OrdinaryDiffEqRosenbrock = "1.4"
40-
OrdinaryDiffEqSDIRK = "1.2"
41-
OrdinaryDiffEqTsit5 = "1.1"
42-
OrdinaryDiffEqVerner = "1.1"
37+
OrdinaryDiffEqFIRK = "2"
38+
OrdinaryDiffEqLowOrderRK = "2"
39+
OrdinaryDiffEqRosenbrock = "2"
40+
OrdinaryDiffEqSDIRK = "2"
41+
OrdinaryDiffEqTsit5 = "2"
42+
OrdinaryDiffEqVerner = "2"
4343
Pkg = "1"
4444
Plots = "1"
4545
PrettyTables = "3"

src/PositiveIntegrators.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using SparseArrays: SparseArrays, AbstractSparseMatrix, SparseMatrixCSC,
88
issparse, nonzeros, nzrange, rowvals, spdiagm
99
using StaticArrays: SVector, SMatrix, StaticArray, StaticMatrix, @SVector, @SMatrix, MMatrix
1010

11-
using FastBroadcast: @..
11+
using FastBroadcast: @.., Serial
1212
using MuladdMacro: @muladd
1313

1414
using Reexport: @reexport
@@ -25,18 +25,17 @@ using SymbolicIndexingInterface: SymbolicIndexingInterface
2525

2626
using LinearSolve: LinearSolve, LinearProblem, LUFactorization, solve!
2727

28-
import SciMLBase: interp_summary
28+
import SciMLBase: SciMLBase, interp_summary
2929

3030
using OrdinaryDiffEqCore: OrdinaryDiffEqAdaptiveAlgorithm,
3131
OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache,
32-
False,
3332
_vec
3433
import OrdinaryDiffEqCore: alg_order, isfsal,
3534
calculate_residuals, calculate_residuals!,
3635
alg_cache, get_tmp_cache,
3736
initialize!, perform_step!,
3837
_ode_interpolant, _ode_interpolant!,
39-
get_fsalfirstlast
38+
get_fsalfirstlast, set_EEst!
4039

4140
using RecipesBase: @recipe
4241

src/mpdec.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ end
606606
tmp = u - u1
607607
atmp = calculate_residuals(tmp, uprev, u, integrator.opts.abstol,
608608
integrator.opts.reltol, integrator.opts.internalnorm, t)
609-
integrator.EEst = integrator.opts.internalnorm(atmp, t)
609+
set_EEst!(integrator, integrator.opts.internalnorm(atmp, t))
610610

611611
integrator.u = u
612612
end
@@ -739,8 +739,8 @@ end
739739
# Now tmp stores error residuals
740740
calculate_residuals!(tmp, σ, uprev, u, integrator.opts.abstol,
741741
integrator.opts.reltol, integrator.opts.internalnorm, t,
742-
False())
743-
integrator.EEst = integrator.opts.internalnorm(tmp, t)
742+
Serial())
743+
set_EEst!(integrator, integrator.opts.internalnorm(tmp, t))
744744
end
745745

746746
@muladd function perform_step!(integrator, cache::MPDeCConservativeCache,
@@ -783,6 +783,6 @@ end
783783
# Now tmp stores error residuals
784784
calculate_residuals!(tmp, σ, uprev, u, integrator.opts.abstol,
785785
integrator.opts.reltol, integrator.opts.internalnorm, t,
786-
False())
787-
integrator.EEst = integrator.opts.internalnorm(tmp, t)
786+
Serial())
787+
set_EEst!(integrator, integrator.opts.internalnorm(tmp, t))
788788
end

src/mprk.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ end
3131

3232
### evaluate_pds ######################################################
3333
# evaluate_pds is used in out-of-place implementations to evaluate
34-
# the production and destruction terms
34+
# the production and destruction terms
3535
@inline function evaluate_pds(f::PDSFunction, u, p, t)
3636
P = f.p(u, p, t)
3737
d = f.d(u, p, t)
@@ -55,7 +55,7 @@ end
5555
end
5656

5757
### lincomb and lincomb! ###############################################
58-
# These functions are used to compute linear combinations of production
58+
# These functions are used to compute linear combinations of production
5959
# matrices and/or destruction vectors.
6060

6161
# out-of-place versions
@@ -97,7 +97,7 @@ end
9797
return nothing
9898
end
9999

100-
# in-place version for sparse matrices
100+
# in-place version for sparse matrices
101101
@muladd @generated function lincomb!(dest::SparseMatrixCSC, pairs...)
102102
n = length(pairs) ÷ 2
103103
nz_names = [Symbol("nz_", i) for i in 1:n]
@@ -188,10 +188,10 @@ end
188188
end
189189

190190
### build_mprk_matrix ############################################################
191-
# These functions build the system matrix M that needs to be solved in each
191+
# These functions build the system matrix M that needs to be solved in each
192192
# Patankar step.
193193

194-
# out-of-place for dense matrices
194+
# out-of-place for dense matrices
195195
function build_mprk_matrix(P, sigma, dt, d = nothing)
196196
# re-use the in-place version implemented below
197197
M = similar(P)
@@ -723,7 +723,7 @@ end
723723
tmp = u - σ
724724
atmp = calculate_residuals(tmp, uprev, u, integrator.opts.abstol,
725725
integrator.opts.reltol, integrator.opts.internalnorm, t)
726-
integrator.EEst = integrator.opts.internalnorm(atmp, t)
726+
set_EEst!(integrator, integrator.opts.internalnorm(atmp, t))
727727

728728
integrator.u = u
729729
end
@@ -838,8 +838,8 @@ end
838838
# Now tmp stores error residuals
839839
calculate_residuals!(tmp, σ, uprev, u, integrator.opts.abstol,
840840
integrator.opts.reltol, integrator.opts.internalnorm, t,
841-
False())
842-
integrator.EEst = integrator.opts.internalnorm(tmp, t)
841+
Serial())
842+
set_EEst!(integrator, integrator.opts.internalnorm(tmp, t))
843843
end
844844

845845
### MPRK43 #####################################################################################
@@ -1131,7 +1131,7 @@ end
11311131
tmp = u - σ
11321132
atmp = calculate_residuals(tmp, uprev, u, integrator.opts.abstol,
11331133
integrator.opts.reltol, integrator.opts.internalnorm, t)
1134-
integrator.EEst = integrator.opts.internalnorm(atmp, t)
1134+
set_EEst!(integrator, integrator.opts.internalnorm(atmp, t))
11351135

11361136
integrator.u = u
11371137
end
@@ -1275,8 +1275,8 @@ end
12751275
# Now tmp2 stores error residuals
12761276
calculate_residuals!(tmp2, tmp, uprev, u, integrator.opts.abstol,
12771277
integrator.opts.reltol, integrator.opts.internalnorm, t,
1278-
False())
1279-
integrator.EEst = integrator.opts.internalnorm(tmp2, t)
1278+
Serial())
1279+
set_EEst!(integrator, integrator.opts.internalnorm(tmp2, t))
12801280
end
12811281

12821282
########################################################################################

src/sspmprk.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ end
169169
tmp = u - σ2
170170
atmp = calculate_residuals(tmp, uprev, u, integrator.opts.abstol,
171171
integrator.opts.reltol, integrator.opts.internalnorm, t)
172-
integrator.EEst = integrator.opts.internalnorm(atmp, t)
172+
set_EEst!(integrator, integrator.opts.internalnorm(atmp, t))
173173

174174
integrator.u = u
175175
end
@@ -287,8 +287,8 @@ end
287287
# Now tmp stores error residuals
288288
calculate_residuals!(tmp, σ, uprev, u, integrator.opts.abstol,
289289
integrator.opts.reltol, integrator.opts.internalnorm, t,
290-
False())
291-
integrator.EEst = integrator.opts.internalnorm(tmp, t)
290+
Serial())
291+
set_EEst!(integrator, integrator.opts.internalnorm(tmp, t))
292292
end
293293

294294
"""
@@ -514,7 +514,7 @@ end
514514
tmp = u - σ
515515
atmp = calculate_residuals(tmp, uprev, u, integrator.opts.abstol,
516516
integrator.opts.reltol, integrator.opts.internalnorm, t)
517-
integrator.EEst = integrator.opts.internalnorm(atmp, t)
517+
set_EEst!(integrator, integrator.opts.internalnorm(atmp, t))
518518
=#
519519

520520
integrator.u = u
@@ -677,7 +677,7 @@ end
677677
# Now tmp2 stores error residuals
678678
calculate_residuals!(tmp2, tmp, uprev, u, integrator.opts.abstol,
679679
integrator.opts.reltol, integrator.opts.internalnorm, t,
680-
False())
681-
integrator.EEst = integrator.opts.internalnorm(tmp2, t)
680+
Serial())
681+
set_EEst!(integrator, integrator.opts.internalnorm(tmp2, t))
682682
=#
683683
end

src/utilities.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function work_precision_fixed!(dict, prob, algs, labels, dts, alg_ref;
159159
error_time[i] = (Inf, Inf)
160160
try
161161
sol = solve(prob, alg; dt, adaptive = false, save_everystep = true)
162-
if Int(sol.retcode) == 1 && isnonnegative(sol)
162+
if SciMLBase.successful_retcode(sol) && isnonnegative(sol)
163163
error = compute_error(sol, ref_sol(sol.t))
164164
time = compute_time_fixed(dt, prob, alg, seconds, numruns)
165165

@@ -240,7 +240,7 @@ function work_precision_adaptive!(dict, prob, algs, labels, abstols, reltols, al
240240
sol = solve(prob, alg; abstol, reltol, save_everystep = true,
241241
kwargs...)
242242

243-
if Int(sol.retcode) == 1 && isnonnegative(sol)
243+
if SciMLBase.successful_retcode(sol) && isnonnegative(sol)
244244
error = compute_error(sol, ref_sol(sol.t))
245245
time = compute_time_adaptive(abstol, reltol, prob, alg, seconds, numruns,
246246
kwargs...)

test/Project.toml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2"
1515
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1616
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
1717
RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4"
18+
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1819
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1920
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2021
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
@@ -24,20 +25,21 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2425
[compat]
2526
ADTypes = "1.16"
2627
Aqua = "0.8"
27-
Clarabel = "0.11"
28+
Clarabel = "0.11.1"
2829
DoubleFloats = "1.4.3"
2930
ExplicitImports = "1.0.1"
3031
JuMP = "1.28"
3132
LinearAlgebra = "1"
32-
LinearSolve = "3.54"
33-
OrdinaryDiffEqLowOrderRK = "1.10"
34-
OrdinaryDiffEqRosenbrock = "1.22"
35-
OrdinaryDiffEqSDIRK = "1.11"
36-
OrdinaryDiffEqTsit5 = "1.9"
37-
OrdinaryDiffEqVerner = "1.10"
38-
Plots = "1.38.9"
33+
LinearSolve = "3.75"
34+
OrdinaryDiffEqLowOrderRK = "2"
35+
OrdinaryDiffEqRosenbrock = "2"
36+
OrdinaryDiffEqSDIRK = "2"
37+
OrdinaryDiffEqTsit5 = "2"
38+
OrdinaryDiffEqVerner = "2"
39+
Plots = "1.38.13"
3940
RecipesBase = "1.3.4"
4041
RecursiveFactorization = "0.2.26"
42+
SciMLBase = "3.7"
4143
SparseArrays = "1"
4244
StaticArrays = "1.9.8"
4345
Statistics = "1"

test/runtests.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ using OrdinaryDiffEqSDIRK: ImplicitEuler, SDIRK2, TRBDF2
1515
using OrdinaryDiffEqTsit5: Tsit5
1616
using OrdinaryDiffEqVerner: Vern7, Vern9
1717
using PositiveIntegrators
18+
import SciMLBase
1819

1920
using Clarabel
2021
using JuMP
@@ -2375,7 +2376,7 @@ end
23752376
# later versions of OrdinaryDiffEq.jl use dtmin = 0 by default,
23762377
# see https://github.com/SciML/OrdinaryDiffEq.jl/pull/2098
23772378
sol = solve(prob, alg; dtmin = 0.0)
2378-
@test Int(sol.retcode) == 1
2379+
@test SciMLBase.successful_retcode(sol)
23792380
end
23802381
end
23812382
end
@@ -2392,7 +2393,7 @@ end
23922393
tspan = prob.tspan
23932394
dt = (tspan[2] - tspan[1]) / 10
23942395
sol = solve(prob, alg; dt = dt)
2395-
@test Int(sol.retcode) == 1
2396+
@test SciMLBase.successful_retcode(sol)
23962397
end
23972398
end
23982399
end
@@ -2576,7 +2577,7 @@ end
25762577
sol_cb = solve(prob_ode_stratreac_scaled, ROS2(); save_everystep = false,
25772578
callback = cb)
25782579

2579-
@test length(sol_cb) == 2
2580+
@test length(sol_cb.t) == 2
25802581
end
25812582

25822583
@testset "Sandu projection get_numsteps_SanduProjection" begin

0 commit comments

Comments
 (0)