Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3702,7 +3702,7 @@ function Feagin12(::Type{T} = BigFloat, ::Type{T_time} = T) where {T, T_time}
c = zeros(T_time, 25)
α = zeros(T, 25)
αEEst = zeros(T, 25)
c[2] = convert(T, big"2")
c[2] = convert(T, big".2")
c[3] = convert(
T,
big".5555555555555555555555555555555555555555555555555555555555555555555555555555555555556"
Expand Down
31 changes: 31 additions & 0 deletions lib/OrdinaryDiffEqExplicitTableaus/test/core_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,35 @@ const ET = OrdinaryDiffEqExplicitTableaus
@time @testset "ODE Tableau Convergence Tests" begin
include("ode_tableau_convergence_tests.jl")
end

@testset "Tableau consistency: c equals row sums of A" begin
for tab in [
ET.Feagin12(BigFloat),
ET.Feagin14(BigFloat),
ET.Ono12(BigFloat),
]
@test tab.c ≈ vec(sum(tab.A, dims = 2)) atol = 1.0e-60
end
end

@testset "Non-autonomous high-order convergence (catches wrong c)" begin
setprecision(BigFloat, 400) do
# u' = u*cos(t) => u(t) = u0*exp(sin(t)); explicit t-dependence exercises c
f_na = ODEFunction(
(u, p, t) -> u * cos(t);
analytic = (u0, p, t) -> u0 * exp(sin(t))
)
prob_na = ODEProblem(f_na, big"1.0", (big"0.0", big"1.0"))
dts_na = big"1.0" ./ 2 .^ (6:-1:3)
for tab in [
ET.Feagin10(BigFloat),
ET.Feagin12(BigFloat),
ET.Feagin14(BigFloat),
ET.Ono12(BigFloat),
]
sim = test_convergence(dts_na, prob_na, ExplicitRK(tableau = tab))
@test sim.𝒪est[:l∞] >= tab.order - 0.3
end
end
end
end