Skip to content

A1 Order conditions ​

IDGroupTypeBackendsFigureProgram
A1AccuracyPCPU (gfortran, nvfortran, ifx; debug and optimised; R8P and R4P)yesselah_test_schemes

Case and scope ​

A Runge–Kutta scheme has order p when its Butcher coefficients satisfy one algebraic condition per rooted tree of up to p nodes. SELAH's coefficients come from several sources:

  • typed literals (euler, ssp-22, ssp-33, rk4);
  • Shu–Osher coefficients converted at run time (ssp-54, ssp-104);
  • 2N coefficients converted at run time (lsrk-33, lsrk-54).

A digit lost in any of them shows up here first.

What the case catches:

  • a wrong coefficient: a residual far above round-off, up to the declared order;
  • a scheme better than declared: when p<4, some condition of order p+1 must fail. Otherwise the declared order is not the scheme's order;
  • an inconsistent tableau: c=A1, and A strictly lower triangular (explicit).

Setup ​

ItemValue
Conditionsthe 8 trees of 1–4 nodes: ∑b=1, ∑bc=1/2, ∑bc2=1/3, ∑bAc=1/6, ∑bc3=1/4, ∑bcAc=1/8, ∑bAc2=1/12, ∑bAAc=1/24
Arithmeticthe stored coefficients converted to quadruple precision (selected_real_kind(33); R8P with nvfortran, which has none)
Bound64 ε(R_P) on every condition up to p; at least one condition of order p+1 above 10−6
Codeorder_residuals in selah_test_tools.F90

Program ​

bash
fobis build --mode tests-gnu && ./exe/selah_test_schemes
SELAH_VV_DIR=exe/vv-data ./exe/selah_test_schemes      # report mode: order-conditions.dat

Results ​

Order conditions

The largest residual of the conditions up to the declared order (coloured), and of the first conditions of the next order (grey).

SchemeOrder pLargest residual, trees up to pLargest residual, trees of p+1
euler100.5
ssp-22200.1667
ssp-3335.55e-170.08333
ssp-5445.13e-16—
ssp-10446.04e-17—
rk445.55e-17—
lsrk-3331.16e-170.04167
lsrk-5448.68e-17—

Residuals in quadruple precision (R8P with nvfortran). Exact zero shows as 0.

Findings ​

  • Every scheme satisfies its conditions to round-off of the stored coefficients. The coefficients converted at run time (ssp-54, ssp-104, the 2N schemes) are within a few ε, the literal ones exact.
  • No scheme of order below 4 is accidentally of higher order.
  • The same program also checks the SSP coefficients (P2), the equivalence of the coefficient forms, the consistency of the Shu–Osher forms (each row of α sums to 1) and the published values.

GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT, at your choice