Skip to content

Commit 1f870c8

Browse files
committed
Fix Tableau and convergence tests passing
1 parent 01e1cbf commit 1f870c8

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

src/perform_step/high_order_rk_perform_step.jl

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ end
616616

617617
@muladd function perform_step!(integrator, cache::PFRK87ConstantCache, repeat_step=false)
618618
@unpack t,dt,uprev,u,f,p = integrator
619-
@unpack α0201, α0301, α0401, α0501, α0601, α0701, α0302, α0403, α0503, α0504, α0604, α0704, α0605, α0705, α0706, α1108, α1208, α1308, α1009, α1109, α1209, α1309, α1110, α1210, α1310, α1211, α1311, β1, β6, β7, β8, β9, β10, β11, β12, β13, β1tilde, β6tilde, β7tilde, β8tilde, β9tilde, β10tilde, β11tilde, β12tilde, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13 = cache
619+
@unpack α0201, α0301, α0401, α0501, α0601, α0701, α0302, α0403, α0503, α0504, α0604, α0704, α0605, α0705, α0706, α0908, α1008, α1108, α1208, α1308, α1009, α1109, α1209, α1309, α1110, α1210, α1310, α1211, α1311, β1, β6, β7, β8, β9, β10, β11, β12, β13, β1tilde, β6tilde, β7tilde, β8tilde, β9tilde, β10tilde, β11tilde, β12tilde, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13 = cache
620620
alg = unwrap_alg(integrator, true)
621621
ν = alg.omega*dt
622622
νsq = ν^2
@@ -631,16 +631,14 @@ end
631631
α0806 = 0.21311136 + 0.093456*α0807
632632
α0901 = 0.07239997637512857 + 0.01913119863380767*α0807
633633
α0904 = -0.688400520601143 - 0.3135390887207368*α0807
634-
α0905 = -0.688400520601143 - 0.3135390887207368*α0807
635-
α0906 = -0.17301267570583073 - 0.06840852844816077*α0807
636-
α0907 = 0.1440060555560846 + 0.031009360422930017*α0807
637-
α0908 = 0.9982362892760762 + 0.33180705811215994*α0807
634+
α0905 = -0.17301267570583073 - 0.06840852844816077*α0807
635+
α0906 = 0.1440060555560846 + 0.031009360422930017*α0807
636+
α0907 = 0.9982362892760762 + 0.33180705811215994*α0807
638637
α1001 = 0.16261514523236525 - 0.12125171966747463*α0807
639638
α1004 = -2.1255544052061124 + 1.9871809612169453*α0807
640639
α1005 = -0.216403903283323 + 0.43356675517460624*α0807
641640
α1006 = -0.060417230254934076 - 0.1965343807796979*α0807
642-
α1007 = -0.060417230254934076 - 0.1965343807796979*α0807
643-
α1008 = 2.4846281621788395 - 2.102961615944379*α0807
641+
α1007 = 2.4846281621788395 - 2.102961615944379*α0807
644642
α1101 = -1.0320124180911034 + 1.061943768952537*α0807
645643
α1104 = 13.666683232895137 - 17.40407843561103*α0807
646644
α1105 = 0.25990355211486116 - 3.797253476860588*α0807
@@ -698,7 +696,7 @@ end
698696

699697
@muladd function perform_step!(integrator, cache::PFRK87Cache, repeat_step=false)
700698
@unpack t,dt,uprev,u,f,p = integrator
701-
@unpack α0201, α0301, α0401, α0501, α0601, α0701, α0302, α0403, α0503, α0504, α0604, α0704, α0605, α0705, α0706, α1108, α1208, α1308, α1009, α1109, α1209, α1309, α1110, α1210, α1310, α1211, α1311, β1, β6, β7, β8, β9, β10, β11, β12, β13, β1tilde, β6tilde, β7tilde, β8tilde, β9tilde, β10tilde, β11tilde, β12tilde, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13 = cache.tab
699+
@unpack α0201, α0301, α0401, α0501, α0601, α0701, α0302, α0403, α0503, α0504, α0604, α0704, α0605, α0705, α0706, α0908, α1008, α1108, α1208, α1308, α1009, α1109, α1209, α1309, α1110, α1210, α1310, α1211, α1311, β1, β6, β7, β8, β9, β10, β11, β12, β13, β1tilde, β6tilde, β7tilde, β8tilde, β9tilde, β10tilde, β11tilde, β12tilde, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13 = cache.tab
702700
@unpack k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12,k13,utilde,tmp,atmp,k = cache
703701

704702
alg = unwrap_alg(integrator, true)
@@ -715,17 +713,14 @@ end
715713
α0806 = 0.21311136 + 0.093456*α0807
716714
α0901 = 0.07239997637512857 + 0.01913119863380767*α0807
717715
α0904 = -0.688400520601143 - 0.3135390887207368*α0807
718-
α0905 = -0.688400520601143 - 0.3135390887207368*α0807
719-
α0906 = -0.17301267570583073 - 0.06840852844816077*α0807
720-
α0907 = 0.1440060555560846 + 0.031009360422930017*α0807
721-
α0908 = 0.9982362892760762 + 0.33180705811215994*α0807
716+
α0905 = -0.17301267570583073 - 0.06840852844816077*α0807
717+
α0906 = 0.1440060555560846 + 0.031009360422930017*α0807
718+
α0907 = 0.9982362892760762 + 0.33180705811215994*α0807
722719
α1001 = 0.16261514523236525 - 0.12125171966747463*α0807
723720
α1004 = -2.1255544052061124 + 1.9871809612169453*α0807
724721
α1005 = -0.216403903283323 + 0.43356675517460624*α0807
725-
726722
α1006 = -0.060417230254934076 - 0.1965343807796979*α0807
727-
α1007 = -0.060417230254934076 - 0.1965343807796979*α0807
728-
α1008 = 2.4846281621788395 - 2.102961615944379*α0807
723+
α1007 = 2.4846281621788395 - 2.102961615944379*α0807
729724
α1101 = -1.0320124180911034 + 1.061943768952537*α0807
730725
α1104 = 13.666683232895137 - 17.40407843561103*α0807
731726
α1105 = 0.25990355211486116 - 3.797253476860588*α0807

src/tableaus/high_order_rk_tableaus.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,8 @@ struct PFRK87ConstantCache{T1,T2} <: OrdinaryDiffEqConstantCache
10431043

10441044
α0706::T1
10451045

1046+
α0908::T1
1047+
α1008::T1
10461048
α1108::T1
10471049
α1208::T1
10481050
α1308::T1
@@ -1118,6 +1120,8 @@ function PFRK87ConstantCache(T1::Type, T2::Type)
11181120

11191121
α0706 = convert(T1, 23124283//1800000000)
11201122

1123+
α0908 = convert(T1, 800635310//3783071287)
1124+
α1008 = convert(T1, 393006217//1396673457)
11211125
α1108 = convert(T1, 15336726248//1032824649)
11221126
α1208 = convert(T1, 5232866602//850066563)
11231127
α1308 = convert(T1, -13158990841//6184727034)
@@ -1166,5 +1170,5 @@ function PFRK87ConstantCache(T1::Type, T2::Type)
11661170
c12 = convert(T2, 1//1)
11671171
c13 = convert(T2, 1//1)
11681172

1169-
PFRK87ConstantCache(α0201, α0301, α0401, α0501, α0601, α0701, α0302, α0403, α0503, α0504, α0604, α0704, α0605, α0705, α0706, α1108, α1208, α1308, α1009, α1109, α1209, α1309, α1110, α1210, α1310, α1211, α1311, β1, β6, β7, β8, β9, β10, β11, β12, β13, β1tilde, β6tilde, β7tilde, β8tilde, β9tilde, β10tilde, β11tilde, β12tilde, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
1173+
PFRK87ConstantCache(α0201, α0301, α0401, α0501, α0601, α0701, α0302, α0403, α0503, α0504, α0604, α0704, α0605, α0705, α0706, α0908, α1008, α1108, α1208, α1308, α1009, α1109, α1209, α1309, α1110, α1210, α1310, α1211, α1311, β1, β6, β7, β8, β9, β10, β11, β12, β13, β1tilde, β6tilde, β7tilde, β8tilde, β9tilde, β10tilde, β11tilde, β12tilde, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
11701174
end

test/algconvergence/ode_convergence_tests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dts1 = 1 .//2 .^(9:-1:5)
1111
dts2 = 1 .//2 .^(7:-1:3)
1212
dts3 = 1 .//2 .^(12:-1:7)
1313
dts4 = 1 .//2 .^(5:-1:3)
14+
dts5 = 1 .//2 .^(3:-1:1)
1415
testTol = 0.2
1516

1617
@testset "Explicit Solver Convergence Tests ($(["out-of-place", "in-place"][i]))" for i in 1:2
@@ -40,6 +41,9 @@ testTol = 0.2
4041
sim3 = test_convergence(dts4,prob,FRK65())
4142
@test sim3.𝒪est[:l∞] 6 atol=0.6
4243

44+
sim3 = test_convergence(dts5,prob,PFRK87())
45+
@test sim3.𝒪est[:l∞] 8.4 atol=0.2
46+
4347
sim4 = test_convergence(dts,prob,BS3())
4448
@test sim4.𝒪est[:l2] 3 atol=testTol
4549
sim5 = test_convergence(dts, prob, AB3())

0 commit comments

Comments
 (0)