Skip to content

Input validation and refusals ​

CasesIssuesTypeBackendsFigureRegression
refusals.sh, rmf-hyperbolic#11, #55, #56, #57, #61, #84 (E3b, E3d), #111CCPU, FNLnormf-hyperbolic (digest + residuals, CPU and FNL)

Case and scope ​

An input PRISM cannot run correctly must stop at initialization with a message that names the option and the value. Before the issues below, several such inputs ran: from the zero field, with an undefined index, without a boundary condition, or with a crash at the first step.

refusals.sh rewrites a base input (rmf, or pic-pec-t0 for a PIC leg) with one sed script per leg and requires two things: a non-zero exit and the refusal's own message in the log. A crash also exits non-zero; only the message tells a refusal from a crash. A leg whose script changes nothing fails, so a drift of the base input cannot make a leg pass vacuously.

rmf-hyperbolic is the positive counterpart of two refusals: the one case with hyperbolic (GLM) cleaning, on D and B. It anchors the state layout that #11 and #61 fixed: nv = 11, ϕ and ψ in slots 7 and 8, J in 9–11. The full divergence-correction matrix is on the hazards page.

Models and numerics ​

ItemChoiceCode
Parsingevery value checked at initialization; CRLF-safe (FiNeR drops the carriage return)adam_prism_numerics_object.F90, adam_prism_physics_object.F90, adam_prism_bc_object.F90, adam_prism_ic_object.F90
rmf-hyperbolicrmf with constrained_transport = DB, divergence_correction = hyperbolic, chi = 1, damping alpha = 1e9 1/s (αt≈0.1 over 10 steps)models
Refused combinationsthe list and the reasonshazards

Initial and boundary conditions ​

Every leg runs at 1 rank and stops at initialization, in a few seconds. rmf-hyperbolic is the rmf grid: 64 blocks of 163 in [−0.06,0.06]3 m, 4 AC coils, Neumann faces, 10 steps, 2 ranks.

Input files ​

FileRole
src/tests/prism/regression/refusals.shthe legs (PRISM_EXE selects the executable; the backend is its suffix, and a leg naming other backends is skipped)
src/tests/prism/regression/rmf/input.ini, pic-pec-t0/input.inithe base inputs
src/tests/prism/regression/rmf-hyperbolic/input.inithe GLM case
src/tests/lint/check-removed-input-keys.shrejects removed keys ([fWLayer] C, [PIC] elliptic_correction, [linear-algebra]) in every committed input
bash
cd src/tests/prism/regression && ./refusals.sh                       # CPU
PRISM_EXE=$PWD/../../../../exe/adam_prism_fnl ./refusals.sh          # FNL

Results ​

Every leg must exit non-zero with the message below in its log.

LegBackendsMessage (grep -F)Refused becauseIssue
hyperbolic-no-ctcpu, fnlhyperbolic needsno ϕ/ψ slot without constrained transport; var_J* were left undefined#61
poissoncpu, fnlpoisson is not implementedno backend implements the Poisson projection#61
blanes-moancpu, fnlBlanes-Moan time integrationthe integrator object is never initialized; the FNL routines are empty#55
cfmcpu, fnlCommutator-Free Magnus time integrationas above#55
leapfrogcpu, fnlleapfrog time integrationas above#55
yoshidafnlYoshida Runge-Kutta time integrationintegrate_rk_yoshida_dev is empty; the CPU integrator works#55
ic-riemann-problemcpu, fnlriemann-problem is not implementedthe initial condition was never applied: the run started from the zero field#56
ic-magnetic-nozzlecpu, fnlis not implemented as an initial conditionas above#56
ic-unknowncpu, fnlunknown [initial_conditions].(type)an unknown type#56
ic-rmf-axiscpu, fnlunknown [external_fields].(RMF_rotation_axis)the component indices were left undefined#56
bc-radiativecpu, fnlradiative is not implementedthe CPU stopped at the first BC application; the FNL kernel applied none#57
scheme-time-typocpu, fnl(scheme_time) "runge-kutta"a typo fell back silently#57
scheme-space-typocpu, fnl(scheme_space) "fd_centred"as above#57
reconstruction-typocpu, fnl(reconstruction_variables) "characteristichs"as above#57
ct-typocpu, fnl(constrained_transport) "DD"as above#57
dc-typocpu, fnl(divergence_correction) "hyperbolc"as above#57
ef-typocpu, fnl(external_fields_applied) "rmff"as above#57
fwl-flag-typocpu, fnl(x_minus_layer) "yse"as above#57
ib-file-offcpu, fnl(definition) "file.off"as above#57
ib-axiscpu, fnl(circle_axis) "w"as above#57
t0-elliptic-amrcpu, fnlneeds a uniform grida t0 elliptic solve on a refined grid: the wide operator across 2:1 faces is not defined#84 E3b
elliptic-correctioncpu, fnlelliptic_correction) is removed[PIC] elliptic_correction = .true., removed; base input pic-pec-t0#84 E3d
probes-sectionscpu, fnl[probe_N] sections are no longer readthe former [probes] input is refused, not ignored#111
probes-numbercpu, fnl(probes_number) is no longer readas above#111
CheckBoundCPUFNL
refusals.shevery leg a clean refusal23 legs24 legs
rmf-hyperbolic digest and residualsrtol = 1e-6, atol = 1e-3passpass

Related pages: the input reference lists every key; slices carries the input validation of the [slice_N] sections; seam div(B) holds the RK-contract refusal of the staged forest path.

Findings ​

  • No input in the list runs any more: each stops at initialization and names the option and the value.
  • The message requirement separates a refusal from a crash, which also exits non-zero.
  • Add a leg whenever an input becomes a refusal.