Skip to content

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.
SSP(5,4) with first-order upwind at ν = C: the total variation never grows. Above its threshold it does. Case P1.
The oscillator at Δt = 0.6. The Strang splitting stays on a closed curve; rk4 spirals inwards. Case P3.

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 ν=CνFE (P1). On the linear upwind operator the actual threshold is higher (ssp-54: 1.25 C), but only C is guaranteed for every TVD operator.
  • SSP(10,4) is the most economical SSP scheme of the catalogue. Its effective coefficient C/s 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 Δt: less loses positivity, Δt 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 |R|=1 (A5, C7).

Accuracy ​

Order conditions, observed orders on scalar problems, through the stepper and for the splittings, and the linear stability regions. Group page.

Properties ​

Strong stability, the SSP coefficients, long-time energy behaviour and conservation. Group page.

Contracts ​

Equivalences, the stage contract, pinned values, the device and the suite's own sensitivity. Group page.

Running it ​

bash
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 hour

The 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.

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