Skip to content

A2 Orders on scalar ODEs ​

IDGroupTypeBackendsFigureProgram
A2AccuracyPCPU (gfortran, nvfortran, ifx; R8P)yesselah_test_schemes

Case and scope ​

The order conditions hold for the coefficients; this case checks the order of the integrator. Every scheme integrates two problems to t=1 with 8, 16, 32, 64 and 128 steps, and the observed order between the last two must reach the declared one. The nonlinear problem catches a scheme that is only of order p on linear problems: its linear order can exceed its order.

Setup ​

ItemValue
Problemsy′=−y, y(0)=1 (exact e−t); y′=−y2, y(0)=1 (exact 1/(1+t))
Integrationthe Butcher tableau, in quadruple precision (integrate_scalar)
Boundobserved order of the last halving at least p−0.2
PrecisionR8P builds only: R4P coefficients cannot show the order of the exact ones

Program ​

bash
./exe/selah_test_schemes
SELAH_VV_DIR=exe/vv-data ./exe/selah_test_schemes      # scalar-orders.dat

Results ​

Scalar orders, nonlinear problem

The error at t=1 of every scheme on y′=−y2. The linear problem: figure.

SchemeProblemDeclaredObserved 8→1616→3232→6464→128
eulery′=−y11.0401.0191.0101.005
ssp-22y′=−y22.0692.0342.0172.008
ssp-33y′=−y33.0723.0363.0183.009
ssp-54y′=−y44.0574.0294.0144.007
ssp-104y′=−y44.0304.0154.0074.004
rk4y′=−y44.0754.0384.0194.009
lsrk-33y′=−y33.0723.0363.0183.009
lsrk-54y′=−y44.0524.0264.0134.007
eulery′=−y211.0511.0241.0121.006
ssp-22y′=−y222.0612.0322.0172.008
ssp-33y′=−y233.0973.0513.0263.013
ssp-54y′=−y244.0624.0344.0174.009
ssp-104y′=−y243.9813.9933.9973.999
rk4y′=−y243.9623.9923.9984.000
lsrk-33y′=−y233.1143.0583.0293.015
lsrk-54y′=−y244.1154.0594.0304.015

Findings ​

  • Every scheme reaches its declared order on both problems.

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