Skip to content

Commit 105688a

Browse files
Merge pull request SciML#2273 from Shreyas-Ekanathan/master
Implement 7th order RadauIIA method
2 parents db715ee + 3db1d76 commit 105688a

File tree

9 files changed

+1168
-196
lines changed

9 files changed

+1168
-196
lines changed

src/OrdinaryDiffEq.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ export FunctionMap, Euler, Heun, Ralston, Midpoint, RK4, ExplicitRK, OwrenZen3,
415415
FRK65, PFRK87,
416416
RKM, MSRK5, MSRK6, Stepanov5, SIR54, QPRK98, PSRK4p7q6, PSRK3p6q5, PSRK3p5q4
417417

418-
export RadauIIA3, RadauIIA5
418+
export RadauIIA3, RadauIIA5, RadauIIA7
419419

420420
export ImplicitEuler, ImplicitMidpoint, Trapezoid, TRBDF2, SDIRK2, SDIRK22,
421421
Kvaerno3, KenCarp3, Cash4, Hairer4, Hairer42, SSPSDIRK2, Kvaerno4,

src/alg_utils.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ qmin_default(alg::DP8) = 1 // 3
176176
qmax_default(alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}) = 10
177177
qmax_default(alg::CompositeAlgorithm) = minimum(qmax_default.(alg.algs))
178178
qmax_default(alg::DP8) = 6
179-
qmax_default(alg::Union{RadauIIA3, RadauIIA5}) = 8
179+
qmax_default(alg::Union{RadauIIA3, RadauIIA5, RadauIIA7}) = 8
180180

181181
function has_chunksize(alg::OrdinaryDiffEqAlgorithm)
182182
return alg isa Union{OrdinaryDiffEqExponentialAlgorithm,
@@ -441,6 +441,7 @@ alg_order(alg::TanYam7) = 7
441441
alg_order(alg::TsitPap8) = 8
442442
alg_order(alg::RadauIIA3) = 3
443443
alg_order(alg::RadauIIA5) = 5
444+
alg_order(alg::RadauIIA7) = 7
444445
alg_order(alg::ImplicitEuler) = 1
445446
alg_order(alg::RKMK2) = 2
446447
alg_order(alg::RKMK4) = 4

src/algorithms.jl

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,60 @@ function RadauIIA5(; chunk_size = Val{0}(), autodiff = Val{true}(),
995995
end
996996
TruncatedStacktraces.@truncate_stacktrace RadauIIA5
997997

998+
"""
999+
@article{hairer1999stiff,
1000+
title={Stiff differential equations solved by Radau methods},
1001+
author={Hairer, Ernst and Wanner, Gerhard},
1002+
journal={Journal of Computational and Applied Mathematics},
1003+
volume={111},
1004+
number={1-2},
1005+
pages={93--111},
1006+
year={1999},
1007+
publisher={Elsevier}
1008+
}
1009+
1010+
RadauIIA7: Fully-Implicit Runge-Kutta Method
1011+
An A-B-L stable fully implicit Runge-Kutta method with internal tableau complex basis transform for efficiency.
1012+
"""
1013+
struct RadauIIA7{CS, AD, F, P, FDT, ST, CJ, Tol, C1, C2, StepLimiter} <:
1014+
OrdinaryDiffEqNewtonAdaptiveAlgorithm{CS, AD, FDT, ST, CJ}
1015+
linsolve::F
1016+
precs::P
1017+
smooth_est::Bool
1018+
extrapolant::Symbol
1019+
κ::Tol
1020+
maxiters::Int
1021+
fast_convergence_cutoff::C1
1022+
new_W_γdt_cutoff::C2
1023+
controller::Symbol
1024+
step_limiter!::StepLimiter
1025+
end
1026+
1027+
function RadauIIA7(; chunk_size = Val{0}(), autodiff = Val{true}(),
1028+
standardtag = Val{true}(), concrete_jac = nothing,
1029+
diff_type = Val{:forward},
1030+
linsolve = nothing, precs = DEFAULT_PRECS,
1031+
extrapolant = :dense, fast_convergence_cutoff = 1 // 5,
1032+
new_W_γdt_cutoff = 1 // 5,
1033+
controller = :Predictive, κ = nothing, maxiters = 10, smooth_est = true,
1034+
step_limiter! = trivial_limiter!)
1035+
RadauIIA7{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve),
1036+
typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac),
1037+
typeof(κ), typeof(fast_convergence_cutoff),
1038+
typeof(new_W_γdt_cutoff), typeof(step_limiter!)}(linsolve,
1039+
precs,
1040+
smooth_est,
1041+
extrapolant,
1042+
κ,
1043+
maxiters,
1044+
fast_convergence_cutoff,
1045+
new_W_γdt_cutoff,
1046+
controller,
1047+
step_limiter!)
1048+
end
1049+
TruncatedStacktraces.@truncate_stacktrace RadauIIA7
1050+
1051+
9981052
################################################################################
9991053

10001054
# SDIRK Methods

0 commit comments

Comments
 (0)