Verification
Every claim these pages make about SELAH is backed by a verification case: a Fortran program in src/tests/ that runs the library and asserts the result against something that shares no code with it. The references are:
- an exact solution;
- a closed form;
- a theorem;
- a published coefficient;
- a golden file;
- ADAM's own code, copied byte for byte.
The same programs are the test suite. bash scripts/run_tests.sh runs all of them, with gfortran, nvfortran and ifx, in double and single precision, and on an NVIDIA A30. With SELAH_VV_DIR set, the same programs also write the data these pages are drawn from (scripts/run_vv.sh). The figures and tables are SELAH's real results, regenerated after any change.
Every case page has the same sections: case and scope, setup, the program and how to run it, results, findings. A card's tag says what kind of check it is:
- physics: an order of accuracy, a stability region, a strong-stability or conservation property, against a closed form or a theorem;
- contract: a bitwise identity, an equivalence (with ADAM, between storage forms), the stage contract, a pinned regression value, host–device agreement, or the suite's own power to detect defects.
What a user of SELAH should know
The findings that change how SELAH should be used, each documented on its page:
- The SSP coefficient is a sufficient bound. Every SSP scheme keeps a forward-Euler TVD operator TVD up to
(P1). On the linear upwind operator the actual threshold is higher (ssp-54: 1.25 C), but only is guaranteed for every TVD operator. - SSP(10,4) is the most economical SSP scheme of the catalogue. Its effective coefficient
is 0.6, against 0.30 for ssp-54, and it runs in two registers (P2). stage_weight(k)is the only correct weight for a flux register. Uniform weights violate conservation at the size of the time error for every scheme whose weights are not uniform (P4).- A splitting reaches its order only with exact sub-flows. The stepper's sub-flow is forward Euler on one partition: exact when that partition's residual does not depend on itself (separable Hamiltonians), first order otherwise (A4).
- A limiter inside an SSP step must use each stage's own forward-Euler step,
stage_euler_fraction(k)times: less loses positivity, itself over-limits ssp-54 and ssp-104 (P2). - Splitting a field step with your own flow: the cheap flow outside, Lie or Strang only for irreversible flows; each operator integrates its own time (A6).
- A companion stepped with the field is the coupled Runge–Kutta step, bitwise (C8); the stage currents keep Gauss's law at every stage (C9).
- A stiff decay integrated exactly (
decay=) is stable at any step and second order, whatever the scheme (P5). - In single precision some schemes lose their exact stability properties at round-off. rk4, for instance, keeps its imaginary-axis interval only to within about 1e-8 of
(A5, C7).
Accuracy
Order conditions, observed orders on scalar problems, through the stepper and for the splittings, and the linear stability regions. Group page.
A2 Orders on scalar ODEsevery scheme on a linear and a nonlinear ODE, four halvingsphysics
A4 Splittingsthe four compositions on the oscillator and the pendulum, both partition ordersphysics
A5 Linear stabilitythe regions |R(z)| ≤ 1 from the library's tableaux, against closed formsphysics
Properties
Strong stability, the SSP coefficients, long-time energy behaviour and conservation. Group page.
P2 SSP coefficientscomputed from the Shu–Osher forms, against the published optimal valuesphysics
P4 Conservationthe stage fluxes weighted by stage_weight telescope to the step's mass changephysics
Contracts
Equivalences, the stage contract, pinned values, the device and the suite's own sensitivity. Group page.
C2 Storage formsevery low-storage form computes its Butcher form's solution to round-offcontract
C4 Golden regression1312 values pinned in a file written once, compared on every compilercontract
C5 Devicethe kernels and the stepper on an NVIDIA A30, against the host and ADAMcontract
C6 Mutation testing28 deliberate defects: does the suite catch every one?contract
C7 Precisionwhat runs and what is asserted in single precisioncontract
Running it
fobis fetch # PENF, FUNDAL and GIDEON
fobis build --mode tests-gnu && bash scripts/run_tests.sh
bash scripts/run_vv.sh # report mode: data, figures, tables, casts
python3 scripts/mutation_test.py # C6: about half an hourThe list of programs, with what each asserts, is on Test programs. What is pinned between releases, and the rules for changing it, are on Regression.
A1 Order conditions
A3 Orders through the stepper
P1 Strong stability (TVD)
P3 Splitting energy