Skip to content

CG4a convergence order test failing in OrdinaryDiffEqLinear #3466

@singhharsh1708

Description

@singhharsh1708

Bug

The CG4a convergence order test in OrdinaryDiffEqLinear is failing on both master and the current fix branches.

Failing test (linear_method_tests.jl:81):

A = MatrixOperator(ones(2, 2), update_func! = update_func!)
prob = ODEProblem(A, ones(2), (0, 30.0))
dts = (0.38) .^ (6:-1:1)
test_setup = Dict(:alg => Vern9(), :reltol => 1.0e-14, :abstol => 1.0e-14)
sim = analyticless_test_convergence(dts, prob, CG4a(), test_setup)
@test sim.𝒪est[:l2]  4 atol = 0.28  # FAILS

where update_func! is:

function update_func!(A, u, p, t)
    A[1, 1] = 0
    A[2, 1] = sin(u[1])
    A[1, 2] = -1
    A[2, 2] = 0
end

Expected

CG4a is a 4th order method — the estimated convergence order should be ≈ 4 within atol = 0.28.

Observed

Test fails, suggesting the measured convergence order is outside the [3.72, 4.28] range for this problem/dt grid combination.

Notes

  • Confirmed pre-existing on master (not introduced by any recent PR)
  • The tolerance atol = 0.28 is already looser than the other CG methods in the same file
  • May need a different dts grid or tighter reference solver tolerance for this nonlinear problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions