Skip to content

Commit edf5ffa

Browse files
Merge pull request #58 from frankschae/rko65
added the Runge Kutta Oliver method as a possible Tableau. In ode_ta…
2 parents 4cf8f19 + 13b34d6 commit edf5ffa

File tree

4 files changed

+67
-1
lines changed

4 files changed

+67
-1
lines changed

src/DiffEqDevTools.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export constructEuler, constructKutta3, constructRK4, constructRK438Rule,
9292
constructHuta62, constructHuta6, constructRKF4,
9393
constructVerner7, constructVerner8,
9494
constructVerner9, constructVerner6, constructSSPRK22, constructSSPRK33,
95-
constructSSPRK43, constructSSPRK104
95+
constructSSPRK43, constructSSPRK104,
96+
constructRKO65
9697

9798
end # module

src/ode_tableaus.jl

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7959,3 +7959,53 @@ function constructDormandPrince8(T::Type = Float64)
79597959
αEEst = map(T,αEEst)
79607960
return(ExplicitRKTableau(A,c,α,8,αEEst=αEEst,adaptiveorder=7))
79617961
end
7962+
7963+
7964+
"""
7965+
Runge Kutta Oliver method, 6 stages, 5th order
7966+
https://www.sciencedirect.com/science/article/pii/S0096300319301511
7967+
"""
7968+
7969+
function constructRKO65(T::Type = Float64)
7970+
A = zeros(T,6,6)
7971+
c = zeros(T,6)
7972+
α = zeros(T,6)
7973+
7974+
c[1] = 2//3
7975+
c[2] = 1//6
7976+
c[3] = 3//4
7977+
c[4] = 1//1
7978+
c[5] = 4//5
7979+
c[6] = 1//1
7980+
7981+
α[2] = 54//133
7982+
α[3] = 32//21
7983+
α[4] = 1//18
7984+
α[5] = -125//114
7985+
α[6] = 1//9
7986+
7987+
A[2,1] = 1//6
7988+
A[3,1] = -15//8
7989+
A[4,1] = -9//1
7990+
A[5,1] = -3//1
7991+
7992+
A[3,2] = 21//8
7993+
A[4,2] = 75//7
7994+
A[5,2] = 34257//8750
7995+
A[6,2] = 123//380 # changed w.r.t. the paper
7996+
7997+
A[4,3] = -5//7
7998+
A[5,3] = -114//875
7999+
A[6,3] = 5//2
8000+
8001+
A[5,4] = 19//1250
8002+
A[6,4] = 3//20
8003+
8004+
A[6,5] = -75//38
8005+
8006+
8007+
A = map(T,A)
8008+
α = map(T,α)
8009+
c = map(T,c)
8010+
return(ExplicitRKTableau(A,c,α,5))
8011+
end

test/ode_tableau_convergence_tests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ for i = 1:2 # 1 = num, 2 = ExplicitRK
131131
sim = test_convergence(dts,prob,tabalg)
132132
@test abs(sim.𝒪est[:l∞]-5) < testTol
133133

134+
tabalg = ExplicitRK(tableau=constructRKO65())
135+
sim = test_convergence(dts,prob,tabalg)
136+
@test abs(sim.𝒪est[:l∞]-5) < testTol
134137

135138
# Order 6
136139

test/ode_tableau_test.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,18 @@ function ode_tableau_tests(T)
128128
@test bb tab.α
129129
@test cc tab.c
130130
end
131+
132+
let erk = RKO65()
133+
A, b, c = deduce_Butcher_tableau(erk)
134+
tab = constructRKO65()
135+
AA = A[2:end, 2:end]
136+
bb = b[2:end]
137+
cc = c[2:end]
138+
@test AA tab.A
139+
@test bb tab.α
140+
@test cc tab.c
141+
end
142+
131143
end
132144

133145

0 commit comments

Comments
 (0)