Skip to content

Verification ​

PRISM's regression suite (src/tests/prism/regression/) pins every case to a golden digest (regression reference). The pages below document the cases that also carry an oracle: a check.sh that asserts a physical or structural property of the run (an invariant, an agreement between two discretisations of the same problem, a refusal) instead of a stored number.

Each page has the same sections: case and scope, models and numerics with references to the code, initial and boundary conditions, input files, results, findings.

The tag on each card says what its page verifies:

  • physics: a run against an exact or reference solution, an order of accuracy or a conservation law;
  • contract: a bitwise identity, rank or decomposition invariance, a structural invariant, an input refusal.

A page without a figure reports its results as a table of bounds and measured values.

Fields on uniform and refined grids ​

The source-free Maxwell system and its discrete invariants on a uniform grid, then the 2:1 faces of static AMR on octrees and quadtrees: the reflux on the finite-volume path and the divergence source the faces inject.

Forests of realms ​

Realms glued by inter-realm seams run as one domain: 1:1 seams, seams between misaligned blocks and a 2:1 seam, each against the single-realm run.

Absorbing layers ​

The far-wave layer and the perfectly matched layer, on uniform and refined grids.

Elliptic solves and particles ​

The t=0 fields of the initial charge and current by FLAIL solves, and the particle-in-cell path of the production runs.

Input and output ​

The inputs PRISM refuses, and the slices it writes.

How it was built ​

The pages in the order the capabilities were implemented, with the issues that built them.

Built underPageCases / legs
— (base)Uniform grid: energy and divergenceperiodic-pulse-blocks (digest)
#13 (M1–M3), #23, #24, #28Static AMR and the FV reflux registerrmf-amr/check.sh: structural, control, register parity
#21, #25, #26, #292:1 seam div(B): truncation orderrmf-amr-fd/check.sh; rmf-amr-fd-pulse/check.sh (control, uniform, seam, RK legs, --convergence)
#46Quadtree 2:1 seamsrmf-amr-fd-pulse/check.sh, quadtree leg
#16, #18, #31Inter-realm 1:1 seams: α and β cadencermf-2realm, rmf-2realm-asymK, rmf-2realm-stagesync (digests); rmf-2realm-fd-pulse/check.sh
#51, #54Inter-realm seams between misaligned blocksrmf-2realm-fv-pulse-blocks/check.sh: small1, small2, one1, one2
#52Inter-realm 2:1 seamrmf-2realm-fd-pulse-refined/check.sh
#38FV reflux on a capped last steprmf-amr-fv-pulse-timed/check.sh
#31, #58, #95 (P5.1)Absorbing layers on AMRrmf-fwl, rmf-fwl-amr, rmf-pml-amr (digests)
#11, #55, #56, #57, #61, #84, #111Input validation and refusalsrefusals.sh (24 legs); rmf-hyperbolic (digest, nv = 11)
#84 (E3b, E3c)t0 elliptic solves on FLAILrmf-pec-t0, rmf-open-t0, pic-pec-t0, pic-open-t0 (check.sh each)
#111, #112PIC: periodic faces and the Fresnel slabpic-periodic, pic-slab-pulse (pic_check.sh legs)
—Slices outputslices/check.sh (oracle, decomposition, adimensional, --convergence, input)

Running a case ​

Every check.sh runs the CPU executable exe/adam_prism_cpu by default; PRISM_EXE selects another one. The PIC cases take the backend as their first argument. mpirun must be on PATH, and the scripts read the Python venv exe/.regression-venv (h5py, numpy) that run.sh creates on its first run.

bash
cd src/tests/prism/regression/rmf-amr-fd-pulse && ./check.sh       # CPU backend
PRISM_EXE=$PWD/../../../../../exe/adam_prism_fnl ./check.sh        # FNL backend (GPU)
./check.sh --convergence                                           # adds the opt-in refinement leg
cd ../pic-periodic && ./check.sh cpu                               # PIC cases: the backend is an argument
cd .. && PRISM_EXE=$PWD/../../../../exe/adam_prism_fnl ./refusals.sh   # the init refusals, FNL
ScriptRanksOptions
rmf-amr/check.sh1 and 2--build
rmf-amr-fd/check.sh1--build
rmf-amr-fd-pulse/check.sh1--build, --convergence, --keep (keeps the quadtree checkpoints for the figure)
rmf-2realm-fd-pulse/check.sh1--build
rmf-2realm-fv-pulse-blocks/check.sh, rmf-2realm-fd-pulse-refined/check.sh2--build, --np N
rmf-amr-fv-pulse-timed/check.sh2--np N
{rmf,pic}-{pec,open}-t0/check.sh1 and 2--build; PRISM_PY selects the Python
pic-{periodic,slab-pulse}/check.sh <cpu|fnl>CPU 1; FNL 1 and 2--capture; FNL_NP, PIC_CHECK_LAUNCH, PRISM_PY
slices/check.sh1, 2, 4--build, --np "N ...", --convergence
refusals.sh1none

--build always builds prism-cpu-gnu, never the PRISM_EXE override. The FNL runs need the NVHPC toolchain on PATH; on the WSL box they also need the UCX settings of run-fnl-local.sh (WSL caveats). The goldened cases are checked by run.sh (running the suite); the oracles are not part of that sweep and are run by hand.

run_verification_legs.sh runs every oracle of this section and logs each case to <outdir>/<case>.log:

bash
src/tests/prism/regression/run_verification_legs.sh $PWD $PWD/exe/adam_prism_cpu /tmp/prism-verif          # CPU
src/tests/prism/regression/run_verification_legs.sh --fnl $PWD $PWD/exe/adam_prism_fnl /tmp/prism-verif    # FNL

The values in the result tables of this section come from these logs (2026-11-08, code at e3da0473): the CPU legs on a medooza node (gfortran 16.2.0, Open MPI 5.0.11), the FNL legs on A30 GPUs (nvfortran 26.9, CUDA 12.9), and slices on the WSL2 workstation (the same compilers, its two GPUs for FNL).

Not done ​

Analytic oracles for the physics are tracked and not yet implemented:

  • #106: plane-wave and Gaussian-pulse convergence, PEC image, cavity mode, PML reflection against the angle of incidence, the infinite wire against Biot–Savart, the Larmor orbit, the plasma frequency;
  • #105: the Fresnel slab against its exact spectral solution. The plane-mean agreement with the exact cold slab is already measured on pic-slab-pulse (PIC page).