Skip to content

Commit 750302a

Browse files
Update alg_cache to take verbose argument for compatibility with new OrdinaryDiffEqCore.__init (#178)
* add verbose argument to alg_cache to be compatible with OrdinaryDiffEqCore __init * bump OrdinaryDiffEqCore compat for alg_cache * use just version 3 for OrdinaryDiffEqCore * bump lower compat for SciMLBase to match OrdinaryDiffEqCore * format * reformat with JuliaFormatter v1.0.60 * format * bump LinearSolve to v3.39 * bump SymbolicIndexingInterface.jl to v0.3.39 * bump SymbolicIndexingInterface.jl to v0.3.42 * bump sublibraries * bump LinearSolve.jl to v3.46 * bump ADTypes.jl to v1.16 * bump LinearSolve.jl to v3.54 * bump compat of SciMLBase.jl to v2.128 * bump RecursiveFactorization.jl to v0.2.26 * bump Plots.jl to v1.33 * bump SymbolicIndexingInterface.jl to v0.3.43 --------- Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> Co-authored-by: Joshua Lampert <joshua.lampert@uni-hamburg.de>
1 parent 389db94 commit 750302a

5 files changed

Lines changed: 37 additions & 25 deletions

File tree

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ JuMPExt = "JuMP"
2727
FastBroadcast = "0.3.5"
2828
JuMP = "1.28"
2929
LinearAlgebra = "1"
30-
LinearSolve = "3.7.1"
30+
LinearSolve = "3.54"
3131
MuladdMacro = "0.2.4"
32-
OrdinaryDiffEqCore = "1.21, 2"
32+
OrdinaryDiffEqCore = "3"
3333
RecipesBase = "1.3.4"
3434
Reexport = "1.2.2"
35-
SciMLBase = "2.78"
35+
SciMLBase = "2.128"
3636
SparseArrays = "1"
3737
StaticArrays = "1.9.7"
3838
Statistics = "1"
39-
SymbolicIndexingInterface = "0.3.36"
39+
SymbolicIndexingInterface = "0.3.43"
4040
julia = "1.10"

src/mpdec.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ end
242242
function alg_cache(alg::MPDeC, u, rate_prototype, ::Type{uEltypeNoUnits},
243243
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
244244
uprev, uprev2, f, t, dt, reltol, p, calck,
245-
::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
245+
::Val{false},
246+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
246247
if !(f isa PDSFunction || f isa ConservativePDSFunction)
247248
throw(ArgumentError("MPDeC can only be applied to production-destruction systems"))
248249
end
@@ -641,7 +642,8 @@ get_tmp_cache(integrator, ::MPDeC, cache::OrdinaryDiffEqMutableCache) = (cache.
641642
function alg_cache(alg::MPDeC, u, rate_prototype, ::Type{uEltypeNoUnits},
642643
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
643644
uprev, uprev2, f, t, dt, reltol, p, calck,
644-
::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
645+
::Val{true},
646+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
645647
nodes, theta = get_constant_parameters(alg, uEltypeNoUnits)
646648
tab = MPDeCConstantCache(alg.K, alg.M, nodes, theta,
647649
alg.small_constant_function(uEltypeNoUnits), Val(alg.M))

src/mprk.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,8 @@ end
454454
function alg_cache(alg::MPE, u, rate_prototype, ::Type{uEltypeNoUnits},
455455
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
456456
uprev, uprev2, f, t, dt, reltol, p, calck,
457-
::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
457+
::Val{false},
458+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
458459
if !(f isa PDSFunction || f isa ConservativePDSFunction)
459460
throw(ArgumentError("MPE can only be applied to production-destruction systems"))
460461
end
@@ -503,7 +504,8 @@ get_tmp_cache(integrator, ::MPE, cache::OrdinaryDiffEqMutableCache) = (cache.σ,
503504
function alg_cache(alg::MPE, u, rate_prototype, ::Type{uEltypeNoUnits},
504505
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
505506
uprev, uprev2, f, t, dt, reltol, p, calck,
506-
::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
507+
::Val{true},
508+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
507509
P = p_prototype(u, f)
508510
σ = zero(u)
509511
tab = MPEConstantCache(alg.small_constant_function(uEltypeNoUnits))
@@ -679,7 +681,8 @@ end
679681
function alg_cache(alg::MPRK22, u, rate_prototype, ::Type{uEltypeNoUnits},
680682
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
681683
uprev, uprev2, f, t, dt, reltol, p, calck,
682-
::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
684+
::Val{false},
685+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
683686
if !(f isa PDSFunction || f isa ConservativePDSFunction)
684687
throw(ArgumentError("MPRK22 can only be applied to production-destruction systems"))
685688
end
@@ -761,7 +764,8 @@ get_tmp_cache(integrator, ::MPRK22, cache::OrdinaryDiffEqMutableCache) = (cache.
761764
function alg_cache(alg::MPRK22, u, rate_prototype, ::Type{uEltypeNoUnits},
762765
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
763766
uprev, uprev2, f, t, dt, reltol, p, calck,
764-
::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
767+
::Val{true},
768+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
765769
a21, b1, b2 = get_constant_parameters(alg)
766770
tab = MPRK22ConstantCache(a21, b1, b2, alg.small_constant_function(uEltypeNoUnits))
767771
tmp = zero(u)
@@ -1121,7 +1125,8 @@ end
11211125
function alg_cache(alg::Union{MPRK43I, MPRK43II}, u, rate_prototype, ::Type{uEltypeNoUnits},
11221126
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
11231127
uprev, uprev2, f, t, dt, reltol, p, calck,
1124-
::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
1128+
::Val{false},
1129+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
11251130
if !(f isa PDSFunction || f isa ConservativePDSFunction)
11261131
throw(ArgumentError("MPRK43 can only be applied to production-destruction systems"))
11271132
end
@@ -1230,7 +1235,8 @@ end
12301235
function alg_cache(alg::Union{MPRK43I, MPRK43II}, u, rate_prototype, ::Type{uEltypeNoUnits},
12311236
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
12321237
uprev, uprev2, f, t, dt, reltol, p, calck,
1233-
::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
1238+
::Val{true},
1239+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
12341240
a21, a31, a32, b1, b2, b3, c2, c3, beta1, beta2, q1, q2 = get_constant_parameters(alg)
12351241
tab = MPRK43ConstantCache(a21, a31, a32, b1, b2, b3, c2, c3,
12361242
beta1, beta2, q1, q2,

src/sspmprk.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ end
106106
function alg_cache(alg::SSPMPRK22, u, rate_prototype, ::Type{uEltypeNoUnits},
107107
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
108108
uprev, uprev2, f, t, dt, reltol, p, calck,
109-
::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
109+
::Val{false},
110+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
110111
if !(f isa PDSFunction || f isa ConservativePDSFunction)
111112
throw(ArgumentError("SSPMPRK22 can only be applied to production-destruction systems"))
112113
end
@@ -199,7 +200,8 @@ get_tmp_cache(integrator, ::SSPMPRK22, cache::OrdinaryDiffEqMutableCache) = (cac
199200
function alg_cache(alg::SSPMPRK22, u, rate_prototype, ::Type{uEltypeNoUnits},
200201
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
201202
uprev, uprev2, f, t, dt, reltol, p, calck,
202-
::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
203+
::Val{true},
204+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
203205
a21, a10, a20, b10, b20, b21, s, τ = get_constant_parameters(alg)
204206
tab = SSPMPRK22ConstantCache(a21, a10, a20, b10, b20, b21, s, τ,
205207
alg.small_constant_function(uEltypeNoUnits))
@@ -491,7 +493,8 @@ end
491493
function alg_cache(alg::SSPMPRK43, u, rate_prototype, ::Type{uEltypeNoUnits},
492494
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
493495
uprev, uprev2, f, t, dt, reltol, p, calck,
494-
::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
496+
::Val{false},
497+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
495498
if !(f isa PDSFunction || f isa ConservativePDSFunction)
496499
throw(ArgumentError("SSPMPRK43 can only be applied to production-destruction systems"))
497500
end
@@ -611,7 +614,8 @@ get_tmp_cache(integrator, ::SSPMPRK43, cache::OrdinaryDiffEqMutableCache) = (cac
611614
function alg_cache(alg::SSPMPRK43, u, rate_prototype, ::Type{uEltypeNoUnits},
612615
::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits},
613616
uprev, uprev2, f, t, dt, reltol, p, calck,
614-
::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
617+
::Val{true},
618+
verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
615619
n1, n2, z, η1, η2, η3, η4, η5, η6, s, α10, α20, α21, α30, α31, α32, β10, β20, β21, β30, β31, β32, c3 = get_constant_parameters(alg)
616620
tab = SSPMPRK43ConstantCache(n1, n2, z, η1, η2, η3, η4, η5, η6, s, α10, α20, α21, α30,
617621
α31, α32,

test/Project.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2222
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2323

2424
[compat]
25-
ADTypes = "1.14"
25+
ADTypes = "1.16"
2626
Aqua = "0.8"
2727
Clarabel = "0.11"
2828
DoubleFloats = "1.4.3"
2929
ExplicitImports = "1.0.1"
3030
JuMP = "1.28"
3131
LinearAlgebra = "1"
32-
LinearSolve = "3.7.1"
33-
OrdinaryDiffEqLowOrderRK = "1.2"
34-
OrdinaryDiffEqRosenbrock = "1.9"
35-
OrdinaryDiffEqSDIRK = "1.3"
36-
OrdinaryDiffEqTsit5 = "1.1"
37-
OrdinaryDiffEqVerner = "1.1"
38-
Plots = "1.25.11"
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.33"
3939
RecipesBase = "1.3.4"
40-
RecursiveFactorization = "0.2.23"
40+
RecursiveFactorization = "0.2.26"
4141
SparseArrays = "1"
4242
StaticArrays = "1.9.7"
4343
Statistics = "1"

0 commit comments

Comments
 (0)