Skip to content

Commit 14e6cb6

Browse files
Merge pull request #2543 from oscardssmith/os/radau-simplification2
Simplify RadauTableau Generation redux
2 parents 1b537a0 + 2da1bca commit 14e6cb6

File tree

11 files changed

+226
-372
lines changed

11 files changed

+226
-372
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
- OrdinaryDiffEqExponentialRK
3535
- OrdinaryDiffEqExtrapolation
3636
- OrdinaryDiffEqFIRK
37-
- OrdinaryDiffEqFIRKGenerator
3837
- OrdinaryDiffEqFeagin
3938
- OrdinaryDiffEqFunctionMap
4039
- OrdinaryDiffEqHighOrderRK

lib/OrdinaryDiffEqFIRK/Project.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ version = "1.5.0"
66
[deps]
77
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
88
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
9+
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
910
FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b"
1011
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1112
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
@@ -15,12 +16,14 @@ OrdinaryDiffEqDifferentiation = "4302a76b-040a-498a-8c04-15b101fed76b"
1516
OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8"
1617
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
1718
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
19+
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1820
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
1921

2022
[compat]
2123
DiffEqBase = "6.152.2"
2224
DiffEqDevTools = "2.44.4"
2325
FastBroadcast = "0.3.5"
26+
FastGaussQuadrature = "1.0.2"
2427
FastPower = "1"
2528
LinearAlgebra = "<0.0.1, 1"
2629
LinearSolve = "2.32.0"
@@ -33,16 +36,18 @@ Random = "<0.0.1, 1"
3336
RecursiveArrayTools = "3.27.0"
3437
Reexport = "1.2.2"
3538
SafeTestsets = "0.1.0"
39+
SciMLBase = "2.60.0"
3640
SciMLOperators = "0.3.9"
3741
Test = "<0.0.1, 1"
3842
julia = "1.10"
3943

4044
[extras]
4145
DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d"
46+
GenericSchur = "c145ed77-6b09-5dd9-b285-bf645a82121e"
4247
ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5"
4348
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4449
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
4550
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4651

4752
[targets]
48-
test = ["DiffEqDevTools", "Random", "SafeTestsets", "Test", "ODEProblemLibrary"]
53+
test = ["DiffEqDevTools", "GenericSchur", "Random", "SafeTestsets", "Test", "ODEProblemLibrary"]

lib/OrdinaryDiffEqFIRK/src/firk_caches.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,10 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}
517517
end
518518
num_stages = min
519519

520-
tabs = [BigRadauIIA5Tableau(uToltype, constvalue(tTypeNoUnits)), BigRadauIIA9Tableau(uToltype, constvalue(tTypeNoUnits)), BigRadauIIA13Tableau(uToltype, constvalue(tTypeNoUnits))]
520+
tabs = [RadauIIATableau5(uToltype, constvalue(tTypeNoUnits)), RadauIIATableau9(uToltype, constvalue(tTypeNoUnits)), RadauIIATableau13(uToltype, constvalue(tTypeNoUnits))]
521521
i = 9
522522
while i <= max
523-
push!(tabs, adaptiveRadauTableau(uToltype, constvalue(tTypeNoUnits), i))
523+
push!(tabs, RadauIIATableau(uToltype, constvalue(tTypeNoUnits), i))
524524
i += 2
525525
end
526526
cont = Vector{typeof(u)}(undef, max)
@@ -598,10 +598,10 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}
598598
end
599599
num_stages = min
600600

601-
tabs = [BigRadauIIA5Tableau(uToltype, constvalue(tTypeNoUnits)), BigRadauIIA9Tableau(uToltype, constvalue(tTypeNoUnits)), BigRadauIIA13Tableau(uToltype, constvalue(tTypeNoUnits))]
601+
tabs = [RadauIIATableau5(uToltype, constvalue(tTypeNoUnits)), RadauIIATableau9(uToltype, constvalue(tTypeNoUnits)), RadauIIATableau13(uToltype, constvalue(tTypeNoUnits))]
602602
i = 9
603603
while i <= max
604-
push!(tabs, adaptiveRadauTableau(uToltype, constvalue(tTypeNoUnits), i))
604+
push!(tabs, RadauIIATableau(uToltype, constvalue(tTypeNoUnits), i))
605605
i += 2
606606
end
607607

@@ -639,7 +639,7 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}
639639
fsalfirst = zero(rate_prototype)
640640
fw = [zero(rate_prototype) for i in 1 : max]
641641
ks = [zero(rate_prototype) for i in 1 : max]
642-
642+
643643
k = ks[1]
644644

645645
J, W1 = build_J_W(alg, u, uprev, p, t, dt, f, uEltypeNoUnits, Val(true))
@@ -671,7 +671,7 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}
671671
atol = reltol isa Number ? reltol : zero(reltol)
672672

673673
AdaptiveRadauCache(u, uprev,
674-
z, w, c_prime, αdt, βdt, dw1, ubuff, dw2, cubuff, dw, cont, derivatives,
674+
z, w, c_prime, αdt, βdt, dw1, ubuff, dw2, cubuff, dw, cont, derivatives,
675675
du1, fsalfirst, ks, k, fw,
676676
J, W1, W2,
677677
uf, tabs, κ, one(uToltype), 10000, tmp,

lib/OrdinaryDiffEqFIRK/src/firk_tableaus.jl

Lines changed: 210 additions & 173 deletions
Large diffs are not rendered by default.

lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ prob_ode_2Dlinear_big = remake(prob_ode_2Dlinear, u0 = big.(prob_ode_2Dlinear.u0
1919

2020
for i in [5, 9, 13], prob in [prob_ode_linear_big, prob_ode_2Dlinear_big]
2121
dts = 1 ./ 2 .^ (4.25:-1:0.25)
22-
sim21 = test_convergence(dts, prob, AdaptiveRadau(min_order = i, max_order = i))
22+
local sim21 = test_convergence(dts, prob, AdaptiveRadau(min_order = i, max_order = i))
2323
@test sim21.𝒪est[:final] i atol=testTol
2424
end
2525

lib/OrdinaryDiffEqFIRKGenerator/test/ode_firk_tests.jl renamed to lib/OrdinaryDiffEqFIRK/test/ode_high_order_firk_tests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
using OrdinaryDiffEqFIRK, OrdinaryDiffEqFIRKGenerator, DiffEqDevTools, Test, LinearAlgebra
1+
using OrdinaryDiffEqFIRK, DiffEqDevTools, Test, LinearAlgebra
22
import ODEProblemLibrary: prob_ode_linear, prob_ode_2Dlinear
33

4+
using GenericSchur
45
testTol = 0.5
56

67
prob_ode_linear_big = remake(prob_ode_linear, u0 = big.(prob_ode_linear.u0), tspan = big.(prob_ode_linear.tspan))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
using SafeTestsets
22

33
@time @safetestset "FIRK Tests" include("ode_firk_tests.jl")
4+
@time @safetestset "High Order FIRK Tests" include("ode_high_order_firk_tests.jl")

lib/OrdinaryDiffEqFIRKGenerator/LICENSE.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

lib/OrdinaryDiffEqFIRKGenerator/Project.toml

Lines changed: 0 additions & 35 deletions
This file was deleted.

lib/OrdinaryDiffEqFIRKGenerator/src/OrdinaryDiffEqFIRKGenerator.jl

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)