Testing
Conventions
Unit tests use GoogleTest; each is named
Suite.Test. They are deterministic, finish in seconds on 1–4 ranks, and run on every commit:ctest -L unit.Regression tests run the application and check the result: most with a script against pinned numbers, a log or a gold file, a few with
amrex_fcompareagainst a gold plotfile. The check scripts print measured / target / tolerance / pass rows.ctest -L smokeruns the checks CI does on every pull request. The longer converged runs carry the labelregressionalone ornightly; no CI job or Kestrel script runs them yet, so they are run by hand (ctest -L regression,ctest -L nightly). The case foldersNest_Placement_Runs,Column_MarchingandSmooth_Plateau_2DinTests/Canonical_RANS/have no CTest; they are run by hand (each folder’s README).Performance tests (iterations, wall time and allocation-unit cost against a stored value) do not exist yet.
Gold files change only in a reviewed commit.
Every test is first shown to fail on the bug it guards against, or on a one-line mutant of the code it covers.
The one-line mutants of the gmres_mlmg default (Source/Poisson.H, Source/Initializer.cpp,
Source/App.cpp), each run against unit_np2, rt_steady_askervein and (P1) rt_init_askervein; every one
is killed:
Mutant |
Change |
Failing tests |
|---|---|---|
P1 |
No fallback: the projection with |
|
P2 |
The old default |
|
P3 |
The split coefficient set for every \(\alpha \ne 1\), also \(\alpha_v = \alpha_h\) |
|
P4 |
The fallback not reported |
|
P5 |
The stage’s log line without the back end |
|
P6 |
The fallback to |
|
P7 |
The |
|
The one-line mutants of the line-sweep variants (Source/LineSweeps.cpp and Source/Driver.cpp), each run against
LineSweeps.*, Driver.* and Predictor.Lusgs* on two ranks by
tools/line_sweep_mutants.py; every one is killed:
Mutant |
Change |
Failing tests |
|---|---|---|
M1 |
Overlap ignored (swept region not grown) |
|
M2 |
Face updated twice (box keeps its high face) |
|
M3 |
Periodic seam updated twice (first box keeps the domain’s low face) |
|
M4 |
Forward wavefront skips its last plane |
|
M5 |
Backward wavefront skips plane 0 |
|
M6 |
Ghost δ not zeroed (neighbours’ values exchanged between passes) |
|
M7 |
Non-owned face copies keep their own value (owner mask all 1) |
|
M8 |
One-cell periodic axis not folded into the diagonal |
|
M9 |
|
|
M10 |
|
|
M11 |
|
|
M12 |
|
|
M13 |
A negative |
|
M14 |
Overlap with lagged ghosts accepted |
|
M15 |
Overlap wider than the narrowest box accepted |
|
M16 |
Line key given with |
|
M17 |
Odd sweeps not reversed ( |
|
M18 |
Reversed forward wavefront skips its last plane |
|
M19 |
Reversed sequential forward pass walks j ascending |
|
M20 |
|
|
M21 |
|
|
M22 |
|
|
M23 |
|
|
The one-line mutants of the transfers between levels (Source/Transfer.cpp; T11–T15 in its interpolation kernel,
Source/Transfer_K.H), each run against Transfer.* on two ranks with the
unit-test flags (SNaN fill, FPE trap) by tools/transfer_mutants.py. 23 are killed. Three survive and the script
lists them as equivalent: T6 and T9 change no value, and T24 changes only the gmres_fft solver’s path, so its result
agrees with the original’s to the solver tolerance. A first run, without the SNaN and FPE flags and before TargetNodeHeightsComeFromTheHierarchy,
OneCellDirectionIsConstant and WrongLevelPairsAbort were added, left T10, T14, T18 and T19 alive as well. “Crash” marks a mutant that stops the run with a
signal in that test (SIGILL on macOS arm64), so the tests after it did not run.
Mutant |
Change |
Failing tests |
|---|---|---|
T1 |
Cell means not |
|
T2 |
x/y-face flux without the fine area factor |
|
T3 |
x/y-face flux not divided by r |
|
T4 |
z-face flux divided by r instead of \(r^2\) |
|
T5 |
Coarse u not divided by the coarse area factor |
|
T6 |
Coarse Ω not divided by the coarse area factor |
Equivalent: \(a_z = 1\) on every mesh |
T7 |
w restricted in place of Ω |
|
T8 |
No zero-gradient rows for the slope term’s u |
|
T9 |
No periodic fill for the slope term’s u |
Equivalent: the slope term reads u on its own cell’s x-faces, no horizontal ghost |
T10 |
Coarse |
|
T11 |
Cell-centred position shifted by half a fine cell |
|
T12 |
No linear extrapolation at a non-periodic face (reads past the last centre) |
|
T13 |
Periodic direction extrapolates instead of reading the periodic image |
|
T14 |
One-cell direction reads a second coarse cell (zero weight, unfilled ghost) |
|
T15 |
x weights swapped on the upper y row |
|
T16 |
w interpolated with the nodal x axis |
|
T17 |
Coarse image filled without the periodic images |
|
T18 |
Fine |
|
T19 |
Fine-below-coarse level check dropped |
|
T20 |
k not clipped |
|
T21 |
Clipped-cell count not summed over ranks |
|
T22 |
Infinite |
|
T23 |
No boundary fill before the projection |
|
T24 |
Projection corrects the Dirichlet rows too (d = 1 + mask) |
Equivalent with |
T25 |
No projection off the Dirichlet rows (d = −mask) |
|
T26 |
p′ not restored after the projection |
|
The one-line mutants of the nested patch’s parent reader (Source/NestParent.cpp, Source/StateIO.cpp and the
periodic axis in Source/Transfer_K.H; N26 and N28 in Source/NestFaces.cpp), each run against NestParent.* and
IO.CheckpointHeader* on two ranks with the unit-test flags by tools/nest_mutants.py (macOS arm64, AppleClang),
and N20 by hand against rt_nest_patch_hill. All 28 are killed (N21 to N28 came with bc.nest_ratio). Three earlier
candidates were equivalent and were replaced: a z shift of the image box (every box spans the column), w through
the cell-centred stencil (it is cell-centred in x and y) and reading the parent’s ghost cells (the 2-cell margin keeps
them out of reach).
Mutant |
Change |
Failing tests |
|---|---|---|
N1 |
u interpolated with the cell-centred x axis (wrong stagger) |
|
N2 |
v interpolated with the cell-centred y axis (wrong stagger) |
the same three |
N3 |
w interpolated with the nodal x axis (wrong stagger) |
the same three |
N4 |
One term of the kernel reads the level above (wrong k) |
|
N5 |
Offset subtracted from the axis bounds with the wrong sign |
|
N6 |
The patch’s position in the parent ignored |
|
N7 |
Periodic direction clamped as before (extrapolates past index −1) |
|
N8 |
No horizontal ghost layers |
the three of N1 |
N9 |
No z ghost rows |
the three of N1 |
N10 |
z ghost rows below the ground copy the second level (wrong k) |
the three of N1 |
N11 |
Parent images filled without the periodic images |
|
N12 |
Margin of one parent cell |
|
N13 |
Ratio not checked |
|
N14 |
z-levels not compared |
|
N15 |
Alignment tolerance of half a parent cell |
|
N16 |
A format-1 parent accepted |
|
N17 |
z-levels written in single-precision decimal |
|
N18 |
z-level count not checked on read |
|
N19 |
A missing Header key names the token read, not the caller’s key |
|
N20 (by hand) |
No |
|
N21 |
The axes built at ratio 2 whatever |
|
N22 |
The parent images coarsened by 2 whatever |
|
N23 |
The placement checked at ratio 2 whatever |
the three of N21, |
N24 |
Any even ratio up to 16 accepted (6, 10, 12) |
|
N25 |
Ratios above 16 accepted |
|
N26 |
The ratio left out of the nest faces’ restart record ( |
|
N27 |
|
the three of N21, |
N28 |
A ratio line in the restart record at ratio 2 too ( |
|
The one-line mutants of the nest faces (Source/NestFaces.cpp and its hooks in Source/BoundaryConditions.cpp,
Source/BoundaryDamping.cpp and Source/BoundaryInputs.cpp; F52 in Source/NestParent.cpp), each run against NestFaces.* on two ranks with
the unit-test flags by tools/nest_faces_mutants.py (macOS arm64, AppleClang), and F40 by hand against
rt_nest_faces_hill_np1. All 53 are killed (F41 to F52 came with the review’s changes, F53 and F54 with
bc.nest_ratio; there is no F45: the
restart record without the parent’s step is equivalent, as the content digest covers the Header, which holds the
step). F21 and F36 survived the first run; the hooks’ comparison in
DiagonalIsTheSourcesDerivative and the pinned record text in RestartRecordIsCheckedAgainstTheInputs were added
for them. One candidate was equivalent and is not in the table: a zone that starts on the normal velocity’s face point
(its term there is replaced by the Dirichlet row).
Mutant |
Change |
Failing tests |
|---|---|---|
F1 |
The net flux summed without the outward sign |
|
F2 |
The weight without 1 / dx (wrong between x and y faces) |
|
F3 |
The high face’s flux read on the low side of its cell |
|
F4 |
The correction added with the wrong sign |
|
F5 |
The correction not applied |
|
F6 |
The correction applied with an outflow face |
|
F7 |
The correction on the valid points only (a ghost copy of a face point keeps the old value) |
|
F8 |
The source with the wrong sign |
|
F9 |
The weight reversed (0 at the face, 1 at the inner end) |
|
F10 |
Abs in place of max(0, U_in): the zone acts where the flow leaves |
|
F11 |
The inward direction of a high face taken as the low face’s |
|
F12 |
Cell centres at the distance of the face points (no half cell) |
|
F13 |
The rate without 1 / N |
|
F14 |
|
|
F15 |
The zone one cell short on a high face |
|
F16 |
The staggered point’s U_in from one face point (no mean along the face) |
|
F17 |
W’s U_in without the row below |
|
F18 |
K relaxed with theta’s parent field |
|
F19 |
The diagonal twice the rate |
|
F20 |
The diagonal of w from the cell-centred rate |
|
F21 |
The source not added (hook removed) |
|
F22 |
One ghost layer filled |
|
F23 |
The normal velocity’s face point not filled |
|
F24 |
The homogeneous fill copies the parent |
|
F25 |
The row without the parent’s value |
|
F26 |
The rows of the high faces missing |
|
F27 |
The nest fill not called (the profile fill’s values stay) |
|
F28 |
A nest face without the parent’s values not refused |
|
F29 |
A linear blend (no smoothstep) |
|
F30 |
The blend measured from every lateral face, nest or not |
|
F31 |
The blend’s two grounds swapped |
|
F32 |
|
|
F33 |
|
|
F34 |
A nest face without bc.nest_parent accepted |
|
F35 |
A nest face without the parent’s field as the first guess accepted |
|
F36 |
The restart record written as another version |
|
F37 |
A restart with other nest settings not refused |
|
F38 |
A record of another version read as this one |
|
F39 |
The zone’s diagonal not added (hook removed) |
|
F40 (by hand) |
The correction not applied (F5) in a run |
|
F41 |
The correction on the face plane only (the normal velocity’s ghost layers keep the parent’s value) |
|
F42 |
The restart record without the parent’s content |
|
F43 |
The restart record with the nest faces only (not the other faces’ types) |
|
F44 |
The restart record without the patch’s place in the parent |
|
F46 |
A lateral no-slip wall beside a nest face accepted |
|
F47 |
A Rayleigh layer on k towards the inflow profile accepted on a patch |
|
F48 |
A sponge towards the inflow profile accepted on a patch |
|
F49 |
No warning for a large net flux |
|
F50 |
The warning whatever the net flux |
|
F51 |
The warning when nothing is removed (an outflow face) |
|
F52 |
The content digest from the |
|
F53 |
|
|
F54 |
|
|
The one-line mutants of the nest inputs (Source/Nests.cpp), each run against Nests.* on two ranks with the
unit-test flags by tools/nests_mutants.py (macOS arm64, AppleClang). All 20 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
NS1 |
|
|
NS2 |
A corner given twice not refused |
|
NS3 |
A margin of 1 outer cell |
|
NS4 |
Nests that touch taken as overlapping |
|
NS5 |
A corner up to a whole outer cell off the faces accepted |
|
NS6 |
A nest of zero width accepted |
|
NS7 |
The nest at the outer cell size (no refinement) |
|
NS8 |
The nest periodic where the outer domain is, whatever it spans |
|
NS9 |
The outer grid hierarchy kept |
|
NS10 |
The outer |
|
NS11 |
The Rayleigh layer kept on k |
|
NS12 |
The outer relaxation zone kept |
|
NS13 |
A corner near an outer face kept as given (not moved onto it) |
|
NS14 |
A nest over the whole outer domain accepted |
|
NS15 |
Nest faces where the nest is periodic |
|
NS16 |
The Agnesi hill at the domain centre whatever |
|
NS17 |
A nest on the outer high face not given that face exactly |
|
NS18 |
The outer forcing taken when the outer run kept none |
|
NS19 |
The outer surface heat flux not taken |
|
NS20 |
The outer y pressure gradient not kept |
|
Two mutants of the run, by hand against rt_nests_one_process: hill_centre not set from the parent
(Source/App.cpp) moves the edge nest’s ground 50.3 m off the outer ground; the nest u compared with the outer
cell one step over in x gives 0.561 m/s against the 0.12 m/s bound. Both fail the test. By hand against their deck
tests: the nest’s init.* record kept fails rt_nests_outer_init_keys; the STF refusal off fails
abort_nests_stf; the nest steady verdict ignored fails abort_nests_nest_not_steady; the checker’s STF mirror
off fails case nests_hill_stf of its self-test.
The mutants of the two-way nests’ restriction and defect source (Source/NestDefect.cpp), each run
against NestDefect.* on two ranks with the unit-test flags by tools/nest_defect_mutants.py (macOS arm64,
AppleClang). All 19 are killed (D11 came with the restriction of nests that touch, D12–D19 with the
open-face-area weights of the restriction).
Mutant |
Change |
Failing tests |
|---|---|---|
D1 |
Cell values a plain mean (no \(J\) weight) |
|
D2 |
u and v not divided by the parent face area |
|
D3 |
\(\Omega\) summed over one nest face row only |
|
D4 |
The pressure level not shifted to the parent’s |
|
D5 |
The pressure shift with the wrong sign |
|
D6 |
A margin of one parent cell |
|
D7 |
The margin also across a periodic direction |
|
D8 |
The source over the whole footprint |
|
D9 |
The source added, not subtracted |
|
D10 |
u copied onto the parent without the periodicity |
|
D11 |
Each nest restricted in full (u, v, then w) before the next (the earlier order) |
|
D12 |
u: the nest’s full face areas ( |
|
D13 |
u: the outer face’s full area as the divisor |
|
D14 |
v: the nest’s full face areas ( |
|
D15 |
v: the outer face’s full area as the divisor |
|
D16 |
\(\Omega\): the nest’s full face areas ( |
|
D17 |
\(\Omega\): the outer face’s full area as the divisor |
|
D18 |
u, v: a closed outer face divided by its zero area (no guard) |
|
D19 |
\(\Omega\): a closed outer face divided by its zero area (no guard) |
|
The one-line mutants of the two-way nests’ relaxation source (Source/NestRelax.cpp, relax and
relax_consistent), each run against NestRelax.* and NestRelaxConsistent.* on two ranks with the unit-test
flags by tools/nest_relax_mutants.py (macOS arm64, AppleClang). All 18 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
X1 |
The source with the wrong sign |
|
X2 |
k left out of the source |
|
X3 |
A margin of three parent cells |
|
X4 |
Cells measured from the face like face points |
|
X5 |
Faces also across a periodic span |
|
X6 |
Overlapping footprints: the last one’s rate, not the larger |
|
X7 |
The rate floored at 0.1 of its full value |
|
X8 |
\(U\) from \(|u|\) alone |
|
X9 |
\(\Delta x\) the larger horizontal cell size |
|
X10 |
No diagonal |
|
X11 |
Only the first footprint’s boxes kept by the box skip |
|
X12 |
Boxes kept by the inner box, not the footprint |
|
X13 |
The source skips the boxes that touch a footprint |
|
C1 |
The added term with the wrong sign |
|
C2 |
The added term left out |
|
C3 |
The residual not weighted |
|
C4 |
The residual weighted by w squared |
|
C5 |
The weight from a footprint one cell wider |
|
By hand against rt_nests_relax: k left out of the source (X2 in the application) leaves the nest’s u error at
\(f = 16\) at 3.26e-2 against 3.27e-2, so the test does not detect it; the unit tests do.
By hand against rt_nests_relax_consistent: with the added term left out (C2) the factor-1 run is the
relax run (160 exchanges, outer minus nest 1.000 of relax’s), and the test fails.
The one-line mutants of the two-way nests’ injection (Source/NestInject.cpp, Source/Simplec.cpp,
Source/Poisson.cpp), each run against NestInject.* and MaskedPoisson.* on two ranks with the unit-test flags
by tools/nest_inject_mutants.py (macOS arm64, AppleClang). All 12 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
J1 |
A factor above 1 accepted |
|
J2 |
No blend: every exchange injects fully |
|
J3 |
The blend from \(q^*\) towards \(q\) |
|
J4 |
k’s rows kept on the inner box |
|
J5 |
No hold after the momentum predictor |
|
J6 |
No hold at the end of the iteration |
|
J7 |
The held faces open in the Poisson operator |
|
J8 |
The held cells solved as fluid cells |
|
J9 |
The inner box left out of the fluid mask |
|
J10 |
The inner box’s faces left out of the open masks |
|
J11 |
A flux through the held faces |
|
J12 |
\(\phi\) shifted by its mean with a mask |
|
By hand against rt_nests_two_way: nest.feedback = none in place of defect (no joint run) fails its
log check, and the first two-nest layout (the crest nest ending at x = 900 m, on the lee slope) fails the nest
ratio at 3.33.
The one-line mutants of the conservative nest faces (Source/NestFaceFlux.cpp, and NestDefect::add in
Source/NestDefect.cpp), each run against NestFaceFlux.* on two ranks with the unit-test flags by
tools/nest_face_flux_mutants.py (macOS arm64, AppleClang). All 8 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
F1 |
The ring’s sum with the wrong sign |
|
F2 |
The transverse trapezoid’s end nodes at full weight |
|
F3 |
A cell-centred flux’s normal average shifted by one nest cell |
|
F4 |
The nest’s fluxes without the ghost exchange |
|
F5 |
The upwind blend’s term dropped |
|
F6 |
The diffusive flux added, not subtracted |
|
F7 |
The ring’s face on the wrong side |
|
F8 |
The correction subtracted from the source ( |
|
By hand against rt_nests_feedback_flux: nest.feedback_flux = outer in place of nest (the defect source
alone) fails its log check, and on the nest crest ending at x = 900 m fails the nest ratio at 3.31 against the
bound 1.6. Without the ring’s suffix on the joint lines (Source/JointRun.cpp) it fails its log check.
The one-line mutants of the canopy’s drag field (Source/Canopy.cpp, Source/Canopy_K.H), each run against
Canopy.* on two ranks with the unit-test flags by tools/canopy_mutants.py (macOS arm64, AppleClang). All 18 are
killed.
Mutant |
Change |
Failing tests |
|---|---|---|
C1 |
Lower-branch polynomial coefficient \(12/6^3\) changed to \(12/215\) |
|
C2 |
Upper-branch tail without the erfc term |
|
C3 |
A cell across \(\eta_m\) misses the lower branch’s top |
|
C4 |
Uniform profile not clipped at the canopy top |
|
C5 |
Cell value not divided by the cell’s height |
|
C6 |
Heights from sea level, not from the local ground |
|
C7 |
A patch across the periodic seam not imaged |
|
C8 |
Overlapping patches replace instead of add |
|
C9 |
Ghost columns not imaged |
|
C10 |
Restriction without the fine \(J\) |
|
C11 |
Restriction not divided by the coarse \(J\) |
|
C12 |
Restart hash of the file name, not its contents |
|
C13 |
Restart with another canopy accepted |
|
C14 |
Patch height 0 accepted |
|
C15 |
|
|
C16 |
Negative map values accepted |
|
C17 |
A patch wider than a periodic direction accepted |
|
C18 |
Cells above half the tallest patch skip the patch loop |
|
The one-line mutants of the canopy’s drag on the momentum equations (Source/CanopyDrag.cpp,
Source/Residual.cpp, Source/Canopy.cpp), each run against Canopy.* and CanopyDrag.* on two ranks with
the unit-test flags by tools/canopy_drag_mutants.py (macOS arm64, AppleClang). All 12 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
D1 |
The sink with the wrong sign |
|
D2 |
x and y faces take one cell’s \(f\), not the mean of two |
|
D3 |
z faces take the cell above only |
|
D4 |
The |
|
D5 |
\(|U|\) without \(w\) |
|
D6 |
\(v\) at an x- or z-face not averaged over its four faces |
|
D7 |
The |
|
D8 |
The residual without the drag |
|
D9 |
|
|
D11 |
The drag rows added to an off-diagonal coefficient |
|
D12 |
|
|
D10 |
A |
|
The one-line mutants of the canopy terms of the k–L closure (Source/CanopyTke.cpp, Source/Closure.cpp,
Source/Closure_K.H, Source/Residual.cpp, Source/Canopy.cpp), each run against Canopy.*,
CanopyDrag.* and CanopyTke.* on two ranks with the unit-test flags by tools/canopy_tke_mutants.py (macOS
arm64, AppleClang). All 13 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
T1 |
Wake production without \(\beta_p\) |
|
T2 |
Wake production with \(|U|^2\) in place of \(|U|^3\) |
|
T3 |
The sink not on the Patankar diagonal |
|
T4 |
The sink added to the exact derivative with the wrong sign |
|
T5 |
The residual without the wake production |
|
T6 |
The residual without the short-circuit sink |
|
T7 |
The capped length not \(\alpha/f\) |
|
T8 |
The live decisions without the canopy |
|
T9 |
The cap’s switch not encoded (not frozen) |
|
T10 |
The capped decision taken against \(\alpha/(2f)\) |
|
T11 |
\(P_b\)’s derivative without \(d(c_\mu'/c_\mu)/dk\) (the error fixed here) |
|
T12 |
|
|
T13 |
|
|
The one-line mutants of the count behind the canopy’s inflow-face and damping-layer warnings
(BoundaryConditions::canopy_in_boundary_zones, Source/BoundaryDamping.cpp), each run against CanopyTke.* by
tools/canopy_zone_mutants.py. All 8 are killed by BoundaryZonesCountTheCanopyCells.
Mutant |
Change |
|---|---|
Z1 |
Every cell counted, not only canopy cells |
Z2 |
The inflow face’s second column counted in place of its first |
Z3 |
The sponge left out |
Z4 |
The Rayleigh layer left out |
Z5 |
An outflow face counted as an inflow face |
Z6 |
The x high face’s second-last column counted |
Z7 |
The y high face’s second-last row counted |
Z8 |
The Rayleigh layer counted when it damps only w |
The one-line mutants of the local step floor (Source/PseudoTime.cpp), the canopy in the column first guess
(Source/ColumnGuess.cpp) and the canopy’s column profile (Source/Canopy.cpp), each run against
PseudoTime.StepFloor*, ColumnCanopy.* and Canopy.ColumnProfile* on two and four ranks by
tools/step_floor_mutants.py (macOS arm64, AppleClang). All 16 are killed. F3 and F4 survived the test’s first
mesh (one box, dx the smaller spacing); the test now uses four boxes with dy < dx.
Mutant |
Change |
Failing tests |
|---|---|---|
F1 |
The floor ignored |
|
F2 |
\(U_{\max}\) from u alone |
|
F3 |
dx for min(dx, dy) |
|
F4 |
No all-reduce of \(U_{\max}\) |
|
F5 |
A negative floor accepted |
|
C1 |
The column’s drag dropped |
|
C2 |
Picard drag (\(|W|\) lagged) |
|
C3 |
No wake production |
|
C4 |
No short-circuit sink |
|
C5 |
No length cap |
|
C6 |
The profile’s size unchecked |
|
C7 |
A non-uniform canopy accepted |
|
C8 |
The terrain unchecked |
|
P1 |
The layer sum, not the mean |
|
P2 |
The spread absolute, not relative |
|
P3 |
The spread from the maximum alone |
|
The one-line mutants of simplec.theta = frozen (Source/Simplec.cpp, Source/Residual.cpp,
Source/Predictor.cpp, Source/Sequencing.cpp, Source/App.cpp, Source/BoundaryConditions.cpp) by
tools/frozen_theta_mutants.py (macOS arm64, AppleClang): F1–F7 and F16–F19 against FrozenTheta.* on two ranks
with the unit-test flags, F8–F15 and F20–F27 against the CTests rt_frozen_theta, abort_simplec_theta_*,
rt_nests_flat_abl_buoyant and *nest_faces_frozen*
(the wiring of the application, which the unit tests do not reach). All 27 are killed.
Mutant |
Change |
Killed by |
|---|---|---|
F1 |
The buoyancy left in the momentum residual |
|
F2 |
The predictor’s point-implicit buoyancy left in the \(w\) rows |
|
F3 |
θ’s residual not zeroed |
|
F4 |
θ swept although frozen |
|
F5 |
|
|
F6 |
Any value of |
|
F7 |
The stage accepts residual inputs that do not match the option |
|
F8 |
The residual inputs keep the momentum buoyancy with frozen θ |
|
F9 |
The coarsest level not reset |
|
F10 |
A prolonged coarse level not reset |
|
F11 |
Level 0 not reset |
|
F12 |
θ from the sounding by absolute height, not by height above the ground |
|
F13 |
Frozen accepted without grid sequencing |
|
F14 |
Frozen accepted with the Newton stage |
|
F15 |
Frozen accepted with a restart |
|
F16 |
The ground extension left out of the fill |
|
F17 |
The ground extension in homogeneous fills too |
|
F18 |
Only the first ghost layer extended |
|
F19 |
The extension’s slope halved |
|
F20 |
θ frozen at the inflow profile’s θ, not the stratified column’s |
|
F21 |
The turbulence plotfile’s |
|
F22 |
The frozen θ read at the floored height ( |
|
F23 |
The levels do not extend θ below the ground |
|
F24 |
Frozen refused in a patch of a parent run ( |
|
F25 |
|
|
F26 |
A frozen patch’s θ reset to 300 K after the interpolation |
|
F27 |
Frozen accepted with the unsteady stage in a patch |
|
The one-line mutants of the physical time term (Source/TimeTerm.cpp, Source/Residual.cpp), each run
against TimeTerm.* on two ranks with the unit-test flags by tools/time_term_mutants.py (macOS arm64,
AppleClang). All 9 are killed. The order of the term against the boundary and building rows is checked for the wall-k
rows (DT8) and the ground and top \(w\) faces only; the test case has no open faces and no buildings.
Mutant |
Change |
Failing tests |
|---|---|---|
DT1 |
The time term with the wrong sign |
|
DT2 |
A factor 2 on \(1/\Delta t\) in the residual |
|
DT3 |
A factor 2 on \(1/\Delta t\) on the diagonal |
|
DT4 |
\(q^n\) taken from the current iterate |
|
DT5 |
|
|
DT6 |
The residual without the time term |
|
DT7 |
|
|
DT8 |
The time term added after the |
|
DT9 |
A denormal |
|
The one-line mutants of the time driver (Source/TimeDriver.cpp, Source/TimeTerm.cpp and the CFL ramp in
Source/Driver.cpp), each run against TimeDriver.* on two ranks with the unit-test flags by
tools/time_driver_mutants.py (macOS arm64, AppleClang). All 16 are killed. TD7 and TD11 survived the first set of tests: every step there ended at the floor
steady.residual_tol, and on flat ground the ghost cells do not enter \(\Delta t\). The tests
InnerStopIsRelativeToTheStepStart and StepFromTargetCflFillsTheGhostsFirst (a periodic bump) were added for
them. That the application passes the time term to the stage (res_in.time in Source/Sequencing.cpp) is
checked by rt_unsteady_hill2d: without it every step stops at unsteady.max_inner.
Mutant |
Change |
Failing tests |
|---|---|---|
TD1 |
\(q^n\) stored at the first step only |
|
TD2 |
The time term keeps the first step’s \(\Delta t\) |
|
TD3 |
The last step not shortened |
|
TD4 |
A tolerance of 1e-6 on the last step (a sliver step is left) |
|
TD5 |
The step from |
|
TD6 |
The inner stop without the floor at |
|
TD7 |
The inner stop’s reference taken at every iteration |
|
TD8 |
One inner iteration more than |
|
TD9 |
|
|
TD10 |
|
|
TD11 |
The ghost cells not filled before \(\Delta t\) |
|
TD12 |
|
|
TD13 |
The time a sum of rounded steps for a fixed step |
|
TD14 |
A target CFL over a field at rest accepted |
|
TD15 |
A step that is not finite accepted |
|
TD16 |
The CFL ramp of an unsteady run stops at a steady verdict |
|
The one-line mutants of the unsteady outputs and the restart (Source/UnsteadyOutput.cpp and
Source/TimeDriver.cpp), each run against UnsteadyOutput.* and TimeDriver.Resume* on two ranks with the
unit-test flags by tools/unsteady_output_mutants.py (macOS arm64, AppleClang). All 15 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
UO1 |
The weight \(t^{n+1} - t^n\) (the averaging start ignored) |
|
UO2 |
West’s \(w/W\) with \(W\) before the add |
|
UO3 |
\(M_2\) from the old mean only |
|
UO4 |
A tie takes the higher cell |
|
UO5 |
\(h\) measured from \(z = 0\), not from the ground |
|
UO6 |
A point on the high face not given the last cell |
|
UO7 |
A restart drops the probe row at the checkpoint’s time |
|
UO8 |
A resumed fixed step summed from the checkpoint’s time (the record’s anchor dropped) |
|
UO9 |
Another step after a restart keeps the checkpoint’s anchor |
|
UO10 |
A resumed run numbers its steps from 1 |
|
UO11 |
A clipped last step keeps the anchor (the next step at \((n_0 + 1)\,\Delta t\)) |
|
UO12 |
Every last step moves the anchor (a chain of restarts at full steps drifts by round-off) |
|
UO13 |
The record’s anchor time not written |
|
UO14 |
A kept probe file reported as new (the checkpoint’s row written twice) |
|
UO15 |
A restart without a probe file reported as kept (no first row) |
|
The one-line mutants of the immersed ground (Source/BuildingForcing.H, Source/BuildingForcing.cpp,
Source/ImmersedStrain.cpp, Source/Residual.cpp, Source/ImmersedTerrain.cpp, Source/Inputs.cpp,
Source/Sequencing.cpp, Source/Heights_K.H, Source/LogShear.cpp, Source/BoundaryDamping.cpp,
Source/Canopy.cpp and Source/CanopyTke.cpp),
each run against ImmersedTerrain.*, LogShear.* and Inputs.ImmersedTerrain* on one rank (IT22 to IT27 on
two ranks, see below), with a rebuild
from the restored sources between two mutants (macOS arm64, AppleClang). All are killed. IT9 (the check of
mesh.is_periodic dropped) is retired: the check was removed when inflow and outflow faces were allowed, and
Inputs.ImmersedTerrainChecksNameTheInput now requires that such a deck is accepted.
Mutant |
Change |
Failing tests |
|---|---|---|
IT1 |
The floor of 10 \(z_0\) put back in the exact wall law |
|
IT2 |
The spacing \(s\) set to 1 |
|
IT3 |
\(s\) left out of the viscous fluxes |
|
IT4 |
The diagonal not raised with the couplings |
|
IT5 |
The strain ratio \(R\) set to 1 |
|
IT6 |
The body forces on the whole face |
|
IT7 |
The restart hash without |
|
IT8 |
The refusal of |
|
IT10 |
A restart with another ground accepted |
CTest |
IT11 |
A body-fitted restart from an immersed checkpoint accepted |
CTest |
IT12 |
The ground’s record not written to the checkpoint |
CTest |
IT13 |
A ground inside the first layer accepted |
CTest |
IT14 |
|
CTest |
IT15 |
The refusal of |
CTest |
IT16 |
The solid inflow faces not set to 0 ( |
|
IT17 |
The cut layer’s height taken at the layer’s centre (the centroid branch never taken) |
|
IT18 |
The wall law’s gradient in the cut cell not applied ( |
|
IT19 |
The wall law’s gradient in the cut cell not applied ( |
|
IT20 |
The absolute Rayleigh height measured from the mesh’s lower face ( |
|
IT21 |
The refusal of |
|
IT22 |
The cut cell’s wall law reading the map in the box’s first row or first column ( |
|
IT23 |
The cut cell’s strain reading the map in the box’s first row or column ( |
|
IT24 |
The strain of the cell above the cut cell reading the map in the box’s first row or column
( |
|
IT25 |
|
|
IT26 |
The canopy’s heights measured from the mesh’s lower face (the ground’s component 0 in |
|
IT27 |
The rough-ground warning counting a column by its first cell ( |
|
IT1 to IT9 were run with a scripted pass over the sources (each change, a rebuild, the named tests, the file
restored and touched), and IT10 to IT15 the same way against the CTests; the scripts are not in the repository.
IT22 to IT25 were run on two ranks against ImmersedTerrain.RoughnessMap*, and IT22 also against the CTest.
IT26 was run on two ranks against Canopy.* and against the CTest (in fill_patch_drag alone it fails the
patch comparison), IT27 on two ranks against the unit test.
The one-line mutants of turb.shear_stencil = log_law (Source/LogShear.cpp, Source/Sequencing.cpp), each
run against LogShear.* on one rank, LS1 and LS7 also against rt_log_shear_column_f0 and
rt_log_shear_column_f07, with a rebuild from the restored sources at the end (macOS arm64, AppleClang). All 9
are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
LS1 |
The central difference \(d_{k+1} - d_{k-1}\) in the place of the log length |
|
LS2 |
\(z_0\) not added to the distance |
the same three unit tests |
LS3 |
Immersed ground: the wall cell not left out |
|
LS4 |
Immersed ground: the solid cells not left out |
|
LS5 |
The gradient of \(v\) taken from \(u\) |
the same three unit tests |
LS6 |
The roughness map read as a uniform \(z_0\) |
|
LS7 |
The option read but the correction not given to the closure |
CTest |
LS8 |
\(d_{k-1}\) in the place of \(d_k\) in the log length |
the same three unit tests |
LS9 |
The cell under the top cell left out |
|
LS1 to LS9 were run the same way; the scripts are not in the repository.
The one-line mutants of the sloping immersed ground (Source/BuildingsSurface.cpp, Source/Heights_K.H,
the slope’s wall-law file, since removed, and Source/ImmersedTerrain.cpp), each run against ImmersedSurface.* on
one rank the same way. All 12 were killed. IS6 to IS9 and IS12 changed the wall law along the ground’s normal,
which has been removed with its tests (Slope); they are no longer listed.
Mutant |
Change |
Failing tests |
|---|---|---|
IS1 |
The cell’s moments from the footprint’s centre height alone (a flat tile per cell) |
|
IS2 |
The side-wall bits kept on a slope |
|
IS3 |
\(d_2\) from the reference cell’s centre in place of its fluid’s mean height |
|
IS4 |
The x face’s blocked part from the centre depth in place of the edge’s mean |
|
IS5 |
The helper’s ground read as 0 (the mesh’s lower face) |
|
IS10 |
The restart hash without the line |
|
IS11 |
The footprint’s centre height from two opposite corners only |
|
The one-line mutants of the wall value of \(k\) beside buildings (buildings.wall_k_bound,
buildings.wall_k_speed: Source/BuildingTke.cpp, Source/BuildingForcing.H, Source/BuildingForcing.cpp
and Source/Buildings.cpp), each run against BuildingTke.* and BuildingLaw.* on two ranks with the
unit-test flags by tools/wall_k_mutants.py (macOS arm64, AppleClang). All 15 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
K1 |
The bound dropped: the law’s value alone |
|
K2 |
A wall at low x reads the \(k\) of the cell at lower x, not the one out along its normal |
|
K3 |
A roof takes the share of the walls along y |
|
K4 |
A fixed face: half of the open face’s square in place of a third |
|
K5 |
The rows of \(k\) read the law’s \(u_*^2\) with |
|
K6 |
No line in the restart hash for |
|
K7 |
|
|
K8 |
The side at high y takes the open face’s speed with |
|
K9 |
A flow that leaves the wall counts as one towards it |
|
K10 |
The share is of the speed, not of the kinetic energy |
|
K11 |
A side at high y takes towards as the positive y of a side at low y |
|
K12 |
The roof’s share reads the wall cell, not the cell above |
|
K13 |
The shares are not filled |
|
K14 |
The share of a side at low x reads the wall cell’s own wind |
|
K15 |
No line in the restart hash for |
|
The one-line mutants of the force on the buildings and the laminar closure (Source/BuildingLoads.cpp,
Source/Residual.cpp and Source/Closure.cpp), each run against BuildingLoads.* and Closure.Laminar* on
two ranks with the unit-test flags by tools/building_loads_mutants.py (macOS arm64, AppleClang). All 9 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
BL1 |
Faces shared by two boxes counted twice ( |
|
BL2 |
The buildings’ fixed rows kept in the residual of the force |
|
BL3 |
The faces on a non-periodic domain face counted |
|
BL4 |
The face volume from half the mean \(J\) |
|
BL5 |
|
|
BL6 |
|
|
BL7 |
k-L keys accepted with |
|
BL8 |
\(k\) diffuses with |
|
BL9 |
The face volume from one cell’s \(J\) (\(J_{i} + J_{i}\) for \(J_{i-1} + J_{i}\)) |
|
The one-line mutants of the force file in unsteady runs and restarts (Source/App.cpp,
Source/BuildingLoads.cpp), each run against the CTests force_file* (the cube with the wall law, four steps of
0.5 s on two ranks) by tools/force_file_mutants.py (macOS arm64, AppleClang). All 4 are killed.
Mutant |
Change |
Failing tests |
|---|---|---|
FF1 |
The force evaluation changes the state (\(u + 10^{-12}\)) |
|
FF2 |
A restart drops the force row at the checkpoint’s time |
|
FF3 |
A restart that finds no force file reported as kept (no first row) |
|
FF4 |
A restart’s force file of another header accepted |
|
The one-line mutants of the Newton stage (Source/NewtonStage.cpp and the switch rules in Source/Driver.cpp),
each run against Driver.* and NewtonStage.* on two ranks with the unit-test flags by
tools/newton_stage_mutants.py (macOS arm64, AppleClang). 13 of 15 are killed. N14 and N15 survive: they matter only
where the SIMPLEC preconditioner loses GMRES at a large CFL (the full-size 2-D hill), which no unit test reaches in
seconds; a Newton study on Askervein (not yet run) would measure them.
Mutant |
Change |
Failing tests |
|---|---|---|
N1 |
The fallback waits for the hysteresis window |
|
N2 |
The forward switch ignores the monitors |
|
N3 |
The forward switch ignores |
|
N4 |
|
|
N5 |
The monitor test against the window’s first record, off by one |
|
N6 |
The fallback after one failure whatever the key |
|
N7 |
A failed step does not count |
|
N8 |
Converged before any accepted step |
|
N9 |
No hand-back for the final pass |
|
N10 |
The continuation’s start CFL not reset on entry |
every |
N11 |
The continuation state not restored on restart |
|
N12 |
No limit on failed visits |
|
N13 |
No idle hand-back |
|
N14 |
The Newton cap not used (the SIMPLEC cap, plain Newton after one step) |
survives (above) |
N15 |
The preconditioner of an infinite \(\Delta\tau\) at the SIMPLEC cap |
survives (above) |
The one-line mutants of the smoothness options (Source/Smoothness.cpp and the floor freeze and stratification gate in
Source/Closure.cpp), each run against Smoothness.* and Closure.* on two ranks with the unit-test flags by
tools/smoothness_mutants.py (macOS arm64, AppleClang). 12 of 13 are killed. S5 survives: it removes the gate
from the decisions that freeze_switches and changed_switches take, and the floor scope’s held bit does not
depend on \(N^2\) (evaluate gates \(N^2\) itself; S4 and S13 cover it there).
Mutant |
Change |
Failing tests |
|---|---|---|
S1 |
The floor scope holds every decision |
|
S2 |
|
|
S3 |
The floor scope decides from the live state (frozen bits ignored) |
|
S4 |
The gate with \(S^2\) not squared |
|
S5 |
The gate not applied in |
survives (above) |
S6 |
|
|
S7 |
No limiter swap |
|
S8 |
|
|
S9 |
|
|
S10 |
The checkpoint’s scope ignored on read |
|
S11 |
A held cell decided at its own \(k\), not the floor (negative \(\nu_t\)) |
|
S12 |
|
|
S13 |
\(P_b\) from the gated \(N^2\) |
|
The one-line mutants of the continuation (Source/Continuation.cpp, the SER law in Source/PseudoTime.cpp and the
GMRES limit in Source/Newton.cpp), each run against Continuation.*, Newton.* and Driver.* on two ranks
with the unit-test flags by tools/continuation_mutants.py (run on macOS arm64 with AppleClang). #36 reported 40
mutants killed but kept no list; these 40 are a new set. The first run left C20, C25 and C36 alive: C25 because
LineSearchRejectsOvershoot no longer pins the trajectory, and C20 and C36 because no test covered them.
LineSearchRejectsOvershoot now checks the
\(k\) floor, and RestoreCapsTheCflAndTheFloorIsChecked covers the other two. All 40 are killed with GCC; with
Clang and AppleClang 39 are, and C2 cannot be told apart from the original.
Mutant |
Change |
Failing tests |
|---|---|---|
C1 |
Armijo without the sufficient decrease (any decrease accepted) |
|
C2 |
Armijo compares a NaN trial (no isfinite guard) |
|
C3 |
Backtracking factor fixed at 1/2 |
|
C4 |
No lower bound on lambda |
|
C5 |
Backtracks not counted |
|
C6 |
Full-step residual not kept (the growth bound never passes) |
|
C7 |
Growth bound strict at the bound |
|
C8 |
Growth-bound step not re-evaluated (last trial kept) |
|
C9 |
Growth-bound flag not recorded |
|
C10 |
SER restarts from the stored CFL after infinite dtau |
|
C11 |
Never switches to infinite dtau |
|
C12 |
Last residual not stored |
|
C13 |
Accepted steps not counted |
|
C14 |
No CFL cut after a failed attempt |
|
C15 |
No floor on the cut CFL |
|
C16 |
A failed attempt keeps infinite dtau |
|
C17 |
Growth bound also at infinite dtau |
|
C18 |
Checkpoint drops the infinite flag |
|
C19 |
Reader ignores r_last |
|
C20 |
Restore keeps a CFL above a lowered |
|
C21 |
|
|
C22 |
|
|
C23 |
No layout check in step |
|
C24 |
\(|R_0|\) never taken from the first step |
|
C25 |
Trial k not clipped at the floor |
|
C26 |
Accepted step not copied back to q |
|
C27 |
Finite dtau even when infinite |
|
C28 |
One retry fewer |
|
C29 |
|
|
C30 |
|
|
C31 |
|
|
C32 |
|
|
C33 |
|
|
C34 |
|
|
C35 |
A repeated key accepted |
|
C36 |
|
|
C37 |
SER without the growth limit |
|
C38 |
SER exponent sign flipped |
|
C39 |
GMRES iteration limit not applied |
|
C40 |
|
|
The tests run with the GPU CI flags (see Running a simulation). Each test runs in a directory under
<build>/Tests/run/: its own by default; the tests of a chain (a run and the checks of its output) share one.
The tests whose check reads plotfiles or arrays with numpy (rt_immersed_open_faces and
rt_immersed_open_faces_*, rt_immersed_roughness_step, rt_immersed_canopy_*,
rt_immersed_askervein_coarse, rt_nests_two_way, rt_nests_relax, rt_nests_relax_consistent,
rt_nests_feedback_flux, rt_nests_inject, rt_nests_flat_abl_* and speed_difference_selftest) are
registered only when the configure’s Python has numpy; the configure names them when it leaves them out.
Each case has its own folder Tests/<group>/<case>/ with a README.md, its input decks, its check script and
its gold files (Gold/); Tests/README.md lists the groups. Check scripts used by more than one case and the
test-only drivers are in Tests/Supporting_Files/.
Current tests
CTest |
What it checks |
|---|---|
|
The GoogleTest suite on 1, 2 and 4 ranks (below). |
|
The same suite with tiling off, as on a GPU. |
|
A 2-rank run; a 3-rank restart on another box layout, whose log must show the restart; the two plotfiles
identical under |
|
The named set-ups ( |
|
The neutral column with the ground immersed in a flat mesh ( |
|
A sloping immersed ground against the terrain-following mesh ( |
|
The wind across the immersed ridge with |
|
|
|
Flat immersed ground between an inflow and an outflow face ( |
|
A step of the roughness length ( |
|
The same channel and setting at solid fractions 0.5 and 0.95 with one option of the open faces each, against the body-fitted channel with that option: a sponge (320 m, 0.05), a power-law inflow, no-slip side walls moving at 8 m/s, and Rayleigh damping of \(u, v, w, k\) above 700 m at the absolute height. Same checks; limits 1.5 % and 8 % (2 % and 10 % with the side walls; measured at most 0.83 % and 5.7 %, 1.41 % and 8.7 % with the walls). The fluxes are the means over \(y\). At most 1000 iterations. Double precision only. Mutant: the solid inflow faces not set to 0 fails all four at 0.95 (no steady verdict, flux difference 7.6e-5). |
|
The canopy decks of |
|
Askervein at 32 x 32 columns as a pair on four ranks ( |
|
The same columns with |
|
The refusals of |
|
The immersed ground in the application (same folder): one iteration of the column on 2 ranks writes a
checkpoint with the ground’s record; a restart on another box layout and 3 ranks accepts it; a restart with
another |
|
The hybrid mesh in the application ( |
|
A roughness map under an immersed ground and under a hybrid mesh’s ground
( |
|
The canopy’s drag field ( |
|
The building geometry (Buildings): each column’s volume against the height map, the wall mask, a restart on
another layout, the refusals (those of |
|
The cube of Snyder and Lawson (1994) in a wind-tunnel boundary layer ( |
|
The staggered cube array of Castro et al. (2006) ( |
|
|
|
A courtyard open to the wind ( |
|
One block on a ridge’s windward flank ( |
|
One block in a log-law wind ( |
|
A restart with one patch’s LAI changed, and one without a canopy, stop naming |
|
Decks that must stop, with the input named in the message. |
|
The column deck with |
|
The thin-cell strip on a 50 m ridge ( |
|
ERF’s Askervein mesh coarsened to 60 × 60 × 18 (20 m × 1.08 layers, BTF, ERF’s terrain
file): statistics of |
|
A 600 m ridge under STF: the report against its gold, including both warnings (STF capped, top not flat). Double-precision builds only. |
|
A run without a solve writes the mapped-grid plotfile of the 2-D hill; The golds of the three mesh tests above were written by STEER itself ( |
|
The Askervein mesh of |
|
The steep ridge of |
|
The Askervein hierarchy with unsmoothed coarse grounds ( |
|
A checkpoint of the Askervein mesh written without a hierarchy (2 ranks), restarted with three levels on 3
ranks: the rebuilt levels 1 and 2 against the golds of |
|
The same checkpoint restarted with two levels at |
|
|
|
|
|
Grid sequencing’s inputs at the application (the truly neutral hill deck with overrides): a loose drop of 9
orders against the strict 8, a monitor tolerance of 1 and sequencing without a hierarchy, all three named
in one abort; a coarsest level of 4 × 1 cells (64 × 16 over five levels); |
|
|
|
|
|
Old against new |
|
|
|
|
|
The same projection with back end B (MLMG, 6 iterations): iterations at most 10 % above
|
|
|
|
The gold’s |
|
The hilltop speed-up over FastWindTerrain’s bump ( |
|
A nested patch at 2 2 1 over a 60 m round Agnesi hill ( |
|
A misplaced patch (shifted 10 m, 20 cells in y), |
|
One-way nesting against a uniform fine run ( |
|
The study of the case README on four ranks: the 25 m and 12.5 m references, one nest from a 50 m parent at half-widths 400 to 1000 m, the relaxation zone, a chain of three nests from 100 m, and the 600 m patch in four boxes on 1, 2 and 4 ranks. Targets T1 to T5 of the README are the verdict (Boundary conditions, Where to put the nest faces). |
|
A one-way patch around a building against a uniform fine run ( |
|
|
|
The study of the case README on four ranks for the hill, the escarpment, the cube and the plate: the reference, the parent and patches at three distances from each shape, and the middle distance in four boxes on 1, 2 and 4 ranks for the hill and the cube. Targets T1 to T4 of the README are the verdict. The ridge, which misses T1 and T2 (README, Expected Results), is not run. |
|
One-way nesting on Askervein ( |
|
A patch at 2 2 1 with four |
|
The flat patch with |
|
The same patch over a 60 m round Agnesi hill, with the parent’s flow entering and leaving on every face. The
parent is steady in 84 iterations, the patch in 103 (one rank) and 102 (two and four). The same checks, with
the net flux between 1e-8 and 1e-3 of the flux entering (measured 6.3e-6, δ = 1.5e-5 m/s; the divergence
4.5e-2 before, 1.7e-12 after) and tolerances of 0.15 m/s and 0.06 m²/s² (measured 6.2e-2, 2.7e-2, 1.6e-2 and
2.4e-2: what the finer cells change over the hill). The final plotfiles on two and four ranks agree with one
rank to 1e-6, relative or absolute (measured 5.0e-7 absolute, in p; not bit for bit, the line sweeps are
local to a box). |
|
The hill patch with |
|
A restart of that patch with |
|
A |
|
The hill patch with a 75 m × 75 m × 20 m block clear of its nest faces ( |
|
|
|
Nests in one run ( |
|
A nest corner off the 50 m outer cell faces, 1 outer cell from |
|
The outer domain stopped at |
|
At |
|
|
|
The |
|
Two-way nests ( |
|
Two-way nests by relaxation ( |
|
Pressure-consistent relaxation ( |
|
Conservative nest faces ( |
|
Nests on a flat, horizontally uniform ABL ( |
|
|
|
|
|
|
|
Two-way nests by injection ( |
|
|
|
|
|
|
|
A joint run stopped after 150 exchanges ( |
|
|
|
|
|
|
|
|
|
The application on the 1-D neutral column ( |
|
The column of |
|
The column on rough ground ( |
|
40 iterations of the column ( |
|
The same chain over terrain: 5 iterations of the 2-D hill ( |
|
The 2-D hill with Coriolis ( |
|
The default of |
|
The application on ERF’s Neutral_ABL_Flat ( |
|
The canopy’s drag on the momentum equations, alone ( |
|
A uniform canopy under a pressure gradient ( |
|
A forest-clearing-forest pattern ( |
|
A canopy on cosine hills ( |
|
A dense canopy on steep terrain with an inflow face ( |
|
|
|
The canopy terms of the k–L closure on |
|
The column first guess with a uniform canopy (Initial conditions) on
|
|
The w rows’ VNN cap on a flat inflow/outflow strip with a 0.7 m first cell
( |
|
The slope margin of the cap on a steep ridge with a 0.4 m first cell
( |
|
The ground step of the mesh report on a 2-D rampart ( |
|
The residual verdict against the wind at 2560 points on analytic 3-D terrain
( |
|
Thin first cells on a 2-D Agnesi ridge ( |
|
Steep terrain at an outflow face ( |
|
ERF’s Neutral_Hill_2D ( |
|
The same hill as unsteady RANS
( |
|
With |
|
|
|
The unsteady deck restarted from the 5-iteration checkpoint of |
|
The refusals of |
|
The refusals of the output keys, each message matched: |
|
Two steps of 60 s with the four probes that write |
|
The 2-D hill with the line LU-SGS sweeps ( |
|
The 2-D hill LU-SGS deck started from the converged column ( |
|
ERF’s Neutral_Hill_3D ( |
|
A truly neutral Hill_3D ( |
|
The default |
|
The deck of |
|
|
|
Askervein on the ERF grid of |
|
The precursor column of the conventionally neutral Askervein case ( |
|
Askervein in a conventionally neutral boundary layer ( |
|
|
|
Askervein with ERF’s setup ( |
|
Old against new for |
|
Old against new: the same deck with the z-line Jacobi configuration of |
|
The |
|
A configure with |
|
The option names before the rename to STEER, each configure stopping before AMReX: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A copy of the archive with one bit flipped is refused, naming the file; bad tool inputs stop the tool with
each input named; a build key given with |
|
|
|
Not registered on Windows. The Kestrel scripts parse; a dry run with stub |
|
Not registered on Windows. |
|
Not registered on Windows. The WindNinja2019 drivers’ |
|
The laminar cylinder ( |
|
The refusals of |
|
|
|
The leaves’ heat exchange (Forest canopy). The refusals name the input: |
|
The column’s target wind carried into the 3-D run ( |
|
|
|
Input checks. Without |
|
|
|
The iteration log (Output files). |
|
The case set-up tool end to end ( |
|
The wind library ( |
|
Ensemble statistics and WindNinja-format grids of the wind library
( |
|
The Python unit tests of the deck checker (standard library only), the case set-up tool, the terrain
download (on tiles made in the test, no network), the case set-up window (offscreen; its window tests
skip without PySide6 and pyqtgraph) and the wind library (on plotfiles written in the test: several boxes,
single and double precision, ghost cells, a sloping ground; log lines, refused runs and library files), and
resumable sweeps ( |
|
Fixtures: they empty the run directories of the tests they are set up for, so no check reads an earlier run’s output. |
In a build without MPI (STEER_MPI=OFF, as in the Windows CI job) every test runs on one rank, so
unit_np2 and unit_np4 repeat unit_np1 and smoke_restart_matches does not change the rank count.
MSVC does not trap floating-point exceptions, so amrex.fpe_trap_invalid=1 has no effect there; the Linux GCC
jobs keep that check.
GoogleTest suite
GoogleTest |
Check |
|---|---|
|
The immersed ground (Immersed terrain): the wall law at the exact distances returns \(u_*\) of a
log profile, also below 10 \(z_0\); the spacing \(s\) at a cut cell of solid fraction 0.7, in the
viscous flux and in the implicit rows, with the diagonal equal to the sum of the couplings, on boxes of 4
and of 2 cells; the strain correction is the identity at solid fraction 0 and gives
\(R\,u_*/(\kappa (d_2 + z_0))\) on a log profile at 0.3, 0.7 and 0.9, and the cut cell takes the wall
law’s gradient \(u_*/(\kappa (d_1 + z_0))\); a body force on the cut cell’s
faces is the open fraction times the force and zero on solid faces; each refusal names its input; the
restart record changes with |
|
The sloping immersed ground (Immersed terrain): the closed-form moments of a triangle and a segment
equal a quadrature; on planes tilted by 10°, 30° and 45° along x and along y, on boxes of 8 and of 4 cells,
the solid fractions, the fluid’s mean heights, the face fractions, the slopes and the two wall distances
equal the closed form of a rectangle cut by a line, only the roof bit is set, and the wall areas of a column
add to 1; a flat surface gives the fields of the flat immersed ground ( |
|
The hybrid mesh’s envelope ( |
|
The three |
|
A reference archive written, verified and loaded: fields bit-identical to the average, metadata and field statistics unchanged; a changed byte, a missing file, an extra file, edited AU, and data changed together with its checksum are each found and named, and loading refuses. |
|
The average equals a host-side recomputation bit for bit and, for fields linear in
time, the mid-window value to 8 ε; trapezoid weights for uneven spacing; the half-window change is exact
for a linear drift and zero for a steady field; a snapshot with a NaN, fewer than 3 snapshots and times out of
order are refused (the first two with their messages); a trailing |
|
AU = nodes × hours × rate (10 CPU, 100 GPU); metadata range checks name their inputs. |
|
SHA-256 against the NIST example vectors, at every padding boundary and chunking;
|
|
Vertical levels: uniform; solved ratio (top exact, ratio 1.0421553943273616 from an independent exact-rational bisection); fixed ratio (ERF’s Askervein 20 m × 1.08, top 749.0048747962335 m); z-levels file and its errors. |
|
Flat terrain gives the Cartesian levels: bit for bit for STF and Sullivan, within 2 ulp for BTF. |
|
Free-stream preservation on round Witch-of-Agnesi and Gaussian hills, all three mappings: divergence below
1e-12 of \((|U|+|V|)/\Delta x\). The cancellation is algebraic for any node heights, so this test does
not detect wrong heights; |
|
Cell volumes sum to the column volumes above the ground to 1e-12, and to a 1 m quadrature of the domain above the hill to 1e-4 (the bilinear ground differs from the continuous hill by 2.4e-5 of the domain). |
|
Smoothing: a constant is unchanged; a Fourier mode is damped by the analytic factor per pass; β ≥ 1/4 is refused. On a non-periodic domain, edge nodes use themselves as the outside neighbour and ghost nodes take the nearest domain node. |
|
IDW returns input points and, with 4 neighbours, is exact on a plane at a symmetric query (with the
default 6 the two extra neighbours break the symmetry and IDW is not exact on a plane); ERF’s bilinear form
is exact on planes anywhere, with ERF’s edge fallback; |
|
|
|
The two mirror images of a query on the diagonal of a 0.1-spaced grid tie exactly,
and the lower index wins, for k = 2 to 8 and both point orders. The squared distance is each square rounded,
then added, so no build can fuse it; with |
|
The IDW bucket search picks the brute-force neighbours; results agree to 1e-13 (random cloud with far queries, a regular grid with exact distance ties, a tie across a bucket edge, a transect queried from a 2-D domain, one point); UTM-sized coordinates are read and interpolated in double; file terrain on a periodic domain has one seam height; every mapping keeps the ground layer as given; ground at the top and inverted cells stop the run; the slope of a diagonal ridge is reported in full; a restart with changed terrain is refused; the report of a steep ridge carries both warnings; the ground step of a ramp in x and in y is the closed form, counted in the thinner of the two first layers, and the report warns above 64 first layers and not below. |
|
Convection on a manufactured flow over a 120 m cosine hill (BTF, geometric layers, 16 × 12 × 8 to 64 × 48 × 32
cells), ghost nodes continuing the layers: the unlimited MUSCL reconstruction (van Albada slope with
\(\epsilon\) above every difference) is second order for q (conservative and bounded forms) and for the u, v
and w control volumes, L2 order ≥ 1.9 on both pairs and max-norm order ≥ 1.9 on the finest. With |
|
Scalar diffusion with a variable \(\gamma\), and momentum diffusion with the full stress tensor and a variable \(\nu\), on the same meshes: L2 order ≥ 1.9 on both pairs, max-norm order ≥ 1.9 on the finest, for q, u, v and w. |
|
Random \(k \ge 0\) (a third of the points zero) and random transport fluxes of ±50 m/s: the step \(k - C(k)/a_P\) with the bounded upwind form leaves every \(k \ge 0\); the conservative upwind form goes below −0.1 in the same step. The bounded form of a constant is zero for every limiter and location. |
|
Random transport (±20 m/s) and diffusivity (0 to 50 m²/s, a fifth zero) over the hill: every neighbour weight of \(A_1\) is ≥ 0 and \(a_P\) equals their sum (1e-14; single 1e-6), for cells and the three velocity components. |
|
The van Albada slope’s derivative changes by less than 0.1 across every point where van Leer switches
(\(a = 0\), \(b = 0\), \(a = -b\), the origin), in three directions; van Leer’s jumps by more than 1.
On the manufactured flow (64 × 48 × 32) the two limiters differ by less than 1 % (L2) for q, u, v and w.
Invalid |
|
\(A_1\) is the explicit operators’ first-order part: bounded upwind convection equals \(A_1 q\) for random q and transport (1e-12; single 1e-5), and on a flat mesh \(-D(q) = A_1 q\) for the scalar and \(-D_c(u) = A_1 u_c\) for each velocity component with random \(\nu\). Over the hill, every weight equals the explicit face flux of a field that varies along one index direction only (this pins the \(1 + \delta_{cd}\) and \(|\mathbf{n}|^2 + n_c^2\) factors on sloping faces). MUSCL convection, both diffusions and \(A_1\) agree to round-off (1e-13) on 16² and 8² column boxes, and boxes that share a face point agree there (not bit for bit: GCC on arm64 contracts multiply-adds inside vectorised loops only). |
|
The divergence (through \(\Omega\)) and the three components of \(G p\) over the 120 m hill (BTF, geometric layers, 16 × 12 × 8 to 64 × 48 × 32 cells): L2 order ≥ 1.9 on both pairs, max-norm order ≥ 1.9 on the finest (single precision 1.8). \(\langle Gp, U\rangle = -\langle p, DU\rangle\) with control-volume weights to 1e-12 of either side (7e-12 against 3.3e4), for random p and a random velocity that vanishes near the ground and top. \(G\) does not read the ghost cells below the ground. |
|
The continuity residual is bit for bit |
|
|
|
Rest over a 300 m hill (slopes up to 0.94), θ = θ_ref(z) stratified, Coriolis on: the momentum, continuity and k residuals are below 1e-14. With a constant reference the hydrostatic \(p(z)\) balances only to truncation (R_u 1.6e-3 m/s², 0.5 % of the buoyancy; R_u and R_w on interior faces below 1 % of the buoyancy). |
|
|
|
Sources in closed form: Coriolis with the \(\cos\varphi\) terms and geostrophic forcing on a uniform wind (\(f = 7.27221\times10^{-5}\) 1/s at 30°, T = 86400 s), buoyancy of a uniform excess; the geostrophic wind is balanced. The residual equals its operators applied one by one (momentum, continuity, θ, k) on the hill with a general state. Invalid options (latitude, period, geostrophic forcing at latitude 0 or with the forcing off, θ₀, gravity, profiles that do not increase) and missing inputs stop with a message. |
|
Node heights shared by two boxes (or periodic images) are equal, for BTF, STF and Sullivan,
periodic and not (under gcc each box’s copy differed by up to 1e-13 m before |
|
The same mesh in one box and in boxes of at most 8 x 8 and 12 x 4 cells ( |
|
Every ghost node in x and y, at every k (the rows below the ground and above the top included), equals the node
it stands for, bit for bit: its periodic image, or the edge node of its row at a non-periodic face. BTF, STF
and Sullivan; periodic in x only, y only, both and neither, and a layout split in z; on 1, 2 and 4 ranks; every
copy of a domain node agrees. Before |
|
The Agnesi ground as written, before any exchange: each ghost node in a periodic direction is its periodic image, bit for bit, and outside a non-periodic face the face node. Round hill and both ridges on a domain not centred at the origin, x periodic and then y. Before, the periodic ghosts were clamped (2.5 m and 4.1 m off). |
|
ERF’s similarity functions (the copied |
|
Reference-height lookup on the ERF#3982 column (dz₀ = 10 m, ratio 1.1, 40 layers): centres belong to the interval above, faces (10 m included) to the interval that holds them, the last centre to the last interval; heights below the first or above the last centre are refused. |
|
u* from a log-law state (u* = 0.45, z₀ = 0.1 m) on that column: within 2e-5 at the first centre, at 10 m, at 55.3 m
and on a centre. With a heat flux, u* matches an independent bisection to 1e-10 for unstable,
stable and low-wind convective cases, and is positive. On rough ground (z₀ = 0.5 m, 1 m first layer,
ln((d + z₀)/z₀) = ln 2): u* from the log law at the first centre and at 0.8 m with
|
|
\(k_w = u_*^2/C_{\mu0}^2\) exactly (neutral); Axell’s buoyant form with a heat flux; the wall eddy viscosity equals \(C_{\mu0}\sqrt{k_w}\,\kappa(d+z_0)\). |
|
Over the hill: the columns’ distances and areas from their nodes; the wall stress along the
ground with magnitude \(u_*^2|A|\). In the residual, R_u, R_v and R_θ change only in the first cells, by the
wall flux minus the interior flux over the cell volume; the k rows are the wall-k rows (both modes). The
|
|
A hybrid mesh’s immersed columns (every third column of the hill masked, ghost columns included): the stress and the drag are 0 there and the wall-k rows of R_k and of the implicit coefficients are left as they were; the other columns equal the run without the mask. |
|
The profile’s \(N\) in closed form against quadrature ( |
|
Every column’s sum of \(f J \Delta\zeta\) is \(C_d\) LAI with a height and LAI that vary over the domain and the top inside stretched cells, both profiles, \(C_d\) constant and from a map; \(f\) is 0 exactly above the canopy and > 0 below. On a 50 m hill (BTF) the same holds and the first cell is \(C_d \mathrm{LAI}/h\) in every column (heights from sea level would leave the hill bare). |
|
The drag field over an immersed ground (the second component of the node heights): a flat ground at cut fractions 0, 0.3, 0.7 and 0.999 of the third layer, both profiles, and a sloping ground. Every column’s sum of \(f J \Delta\zeta\) is \(C_d\) LAI; the cells below the ground hold 0; with the uniform profile each cell holds \(C_d \mathrm{LAI}/h\) times its overlap with the canopy above the ground over its whole height; the log line and the rough-ground warning count every column. On the sloping ground the same with a map, and a round patch 400 m across holds the map’s values in its columns. The errors are reduced over the ranks. |
|
Three patches give the same field, bit for bit, on 1, 16 and uneven boxes; the patch across the periodic seam reaches the columns on the other side; overlapping patches add, and a layer above the shorter patch holds the taller one’s drag alone; the ghost column is the periodic image in x and the nearest column in y. |
|
On a hill smoothed differently on each level (levels 1 and 2, gathered on one box or not), each layer’s integral of \(f\) over the coarse cells equals that over level 0. |
|
The same canopy restarts; one changed LAI, a canopy where the checkpoint has none and none where it
has one are refused; the hash follows the contents, not the file name. The option checks, the patch file’s
lines (named by number), negative map values and a patch wider than the periodic domain are refused with the
input named. That |
|
On linear velocity fields (so every four-point mean is the value at the face) through a uniform patch, each face’s residual is \(f_c |U| u_c\) with \(f_c = C_d\,\mathrm{LAI}/h\) or 0 in closed form, on 1 and 16 boxes (the faces on box edges read the ghost column), the ground z-faces taking the first cell. |
|
On sign-changing periodic velocities, the |
|
The residual’s momentum rows gain exactly the sink and |
|
On the 2-D hill (k–L closure, wall law with |
|
|
|
At \(q = q^n\) the residual is unchanged in value. That the steady path
(no time term) is bit-identical is shown by the regression tests, whose golds are unchanged. |
|
A lid started impulsively at 1 m/s over fluid at rest (\(\nu\) = 0.01 m²/s, 1 m deep, 64 layers, four boxes) to \(T\) = 1 s with \(\Delta t\) = 0.1, 0.05 and 0.025 s. The differences between successive runs halve: observed order 0.998, within 0.85–1.15. Against Stokes’ first problem, \(u = U\,\mathrm{erfc}((H - z)/(2\sqrt{\nu T}))\), the error at 0.025 s is 4.2e-3, below 1.5 times the last difference (3.5e-3, the backward-Euler error); the Richardson value \(2u_{\Delta t/4} - u_{\Delta t/2}\) is within 8.2e-4 (the space error), below 1.5e-3. Double precision only. |
|
The same channel from rest with \(\Delta t\) = 10 s to 300 s reaches the Couette profile \(u = Uz/H\) within 1.6e-9 (bound 1e-8; single 1e-3). Started on the profile, each of three steps takes one inner iteration and the profile does not change (1e-10). |
|
0.25 s in steps of 0.1 s is 0.1, 0.1, 0.05 s, ending at 0.25 s, with the time term’s \(\Delta t\) and
\(1/\Delta t\) those of the last step. |
|
1.00005 s in steps of 0.1 s is ten steps, the last 0.10005 s (within 0.1 % of the time left), not eleven with a
sliver; the time of step \(n\) is exactly \(n\) times 0.1 in double (nine sums of 0.1 are not). A
\(\Delta t\) of 0, \(\infty\) or NaN is refused naming |
|
A non-uniform state that changes with time on four boxes, six irregular steps
(0.1 to 2.5 s) with |
|
The averages read on another box layout and the |
|
Comments and blank lines are skipped; two numbers, a word, NaN, \(h = 0\) and four numbers are each refused
with |
|
On flat ground with layers of 0.125 m, \(h\) = 0.3 takes the cell at 0.3125 m, the tie \(h\) = 0.25 the lower cell (0.1875 m), the domain’s high corner the last cell and the low corner the first; a probe samples its cell’s closed-form values. On a bump the cell is the one nearest \(h\) above the local ground, from a host scan of the node heights. |
|
A new file has the header and one row per call; reopened with the time 1, it keeps the rows up to 1, and
the rows written after it make the file equal to the run without the restart. |
|
A driver resumed after step 3 of 0.1 s numbers its steps 4 to 10 and gives the times of the run without the restart bit for bit; with 0.05 s after the checkpoint, the times are \(t_0 + n \cdot 0.05\) and the run ends at its stop time. After a clipped last step (0.3 s steps to 1 s, anchor (1 s, 4)) a restart to 2 s ends its first step at 1.3 s, not 1.5 s. A chain of restarts (0.1 s to 0.3 s, then 0.05 s to 0.6 s and on to 1 s) gives the steps and times of one restart (0.05 s to 1 s) bit for bit. |
|
With a uniform 5 m/s wind, \(P_c = \beta_p f |U|^3\) and \(D_c = \beta_d f |U| k\) on every cell; where \(k = \beta_p |U|^2/\beta_d\) they balance; the Patankar diagonal gains \(\beta_d f |U|\) and the exact one loses it. |
|
With the cap: in a uniform wind (no shear production), neutral, every capped canopy cell has \(P_c = D_c + \varepsilon\) at \(k = \kappa_c |U|^2\), \(\kappa_c\) the root of \(\beta_d \kappa + C_{\mu0}^3 \kappa^{3/2}/\alpha = \beta_p\) (0.1728 for the defaults). |
|
\(L = \min(L_\text{free}, \alpha/f)\) where \(f > 0\) and \(\varepsilon\) follows it; the same bits where \(f = 0\) or with \(\alpha = 0\); both capped and uncapped canopy cells occur. |
|
With the switches frozen, \(dS_k/dk\) by central differences equals |
|
A canopy with a zero drag field leaves every closure field bit for bit; the residual of \(k\) gains exactly \(D_c - P_c\). |
|
The count behind the inflow-face and damping-layer warnings: a patch covering only the first column of the inflow face is counted there; with a 100 m sponge on the inflow and outflow faces and a Rayleigh layer above 15 m, the canopy cells whose centre lies in either are counted (the Rayleigh layer on w alone is not); patches in the first column or row of each of the four faces are counted with that face inflow; an outflow face and no damping count nothing. |
|
A capped decision held for a smaller \(k\) keeps \(L = \alpha/f\); on the field the moved decisions are counted and the frozen evaluation keeps the cap. The ground-\(z_0\) warning counts every canopy column when \(z_0\) = 1 m and none when 0.05 m. |
|
The momentum predictor’s \(a_P\) is that of the run without a canopy plus the rows computed at the state before the step, on all three components (the v and w rows do not see the u the step has just updated); a step on an increment from zero, as the Newton preconditioner takes, has the same \(a_P\). |
|
|
|
Three iterations of the laminar stage from a random state whose θ is up to 5 K from the reference, on 4 boxes: with θ frozen, θ is unchanged to the last bit and its residual is 0 at every iteration, and u, v, w, p and k are bit for bit those of the frozen stage with gravity off; with θ solved, θ moves and w differs. |
|
With the k–L closure and θ frozen at a stable 10 K/km, one iteration gives a total \(\nu\) below 0.9 times that with gravity off (the closure’s \(N^2\)). |
|
The stage refuses frozen θ with the momentum buoyancy on, and the momentum buoyancy off without frozen θ. |
|
With the ground extension on, θ’s two ground ghost layers are \(2\theta_0 - \theta_1\) and \(3\theta_0 - 2\theta_1\) on uniform layers, in every column of 4 boxes (lateral ghost columns included); off, and in a homogeneous fill with it on, the slip ground’s mirror (\(\theta_0\), \(\theta_1\)). |
|
The Poisson boundary types of every face type on every face it may take, periodic directions included, equal
ERF’s |
|
On a ridge whose height varies along the inflow face: every inflow ghost point (both layers, u, v, θ, k) takes the profile at its own height above the ground, the inlet wind varies along the face by more than 0.05 m/s, and the outflow face points of u are not Dirichlet rows. The ghost values of every rule for every face type (even, odd, value, profile, gradient, the Dirichlet face points, the top’s θ gradient); the analytic profiles and their equilibrium k and \(\nu_t\), and a file table with and without a k column. On a domain two cells wide in x with slip walls on both x faces, the low face is filled first: \(u(-2) = -u(2)\) before the high face sets \(u(2) = 0\), and \(u(4) = -u(0) = 0\) (one launch for both faces would read the other face’s points; a CPU build, which runs the tags in order, fails if the split is lost). |
|
Over a 120 m hill with a stable heat flux, the ground ghosts of u, v and θ give MOST’s
gradient at the first centre (u* φ_m/(κ(d₀ + z₀)) along the stress, −q φ_h/(κ u* (d₀ + z₀))) in both layers,
on the two lateral ghost columns too (the periodic images of the neighbouring boxes; this catches a gradient
slab with too few ghost columns under |
|
|
|
The turbulence plotfile’s |
|
Kynema’s |
|
The default of |
|
|
|
The point-implicit update k + S_k/(1/Δτ + ∂S_k/∂k) with the Patankar diagonal stays ≥ 0 (> 0 with production) for 1/Δτ = 1, 1e-3 and 0 on 5000 random states; without the diagonal a decaying state goes negative. |
|
The dual-number dS_k/dk and dν_t/dk against central finite differences on 3000 random states (branches held): relative 1e-6 (single 1e-2); the dual value part equals the Real evaluation to a few ulp. |
|
Every |
|
\(d + z_0 > 0\) is checked once per level, where the wall distance is made, the ghost cells
included: a zero ghost distance is refused with \(z_0 = 0\) and accepted with 0.1, −0.1 with 0.1 is
refused. |
|
The logarithmic mean against (a − b)/ln(a/b) on random pairs (1e-13; single 1e-5), equal values, zero,
continuity across its series switch; on a log-law column the logarithmic face mean gives the wall flux u*² at
every interior u face (1e-12) where the arithmetic mean misses the first by 2–12 %; the implicit operator with
the same mean satisfies A₁u = −D(u). Over a 120 m hill the residual with the closure equals the residual with
the closure’s own fields given minus the sources bit for bit, the k line Jacobian’s diagonal differs by dSdk
exactly, every field is finite with positive diffusivities, misuse (fields given with a closure, no wall
distance) is refused, and |
|
Manufactured \(\phi\) on a stretched STF mesh over a 60 m hill: every lateral BC (periodic, Neumann, Dirichlet) with a Dirichlet or Neumann top, 2-D (y periodic) at three resolutions, and a 3-D case (Neumann in x, Dirichlet in y, two resolutions): order ≥ 1.9 (single precision: 1.8 coarse, 1.6 fine), residual below 10 × tolerance. The solution has zero gradient at the ground and level side faces, so it measures the order away from the ground’s cross terms; the next row tests a tangential gradient at sloped ground. |
|
With a tangential gradient at sloped ground: order ≥ 1.9 on flat ground and over 60 m and 120 m hills (64 → 128 → 256 cells), and a fine-mesh error over the 120 m hill less than twice that over the 60 m hill (1.33 measured). Double precision only. With the even ghost used before, the hill orders were about 1 and the ratio about 4 (slope²). Pins the ground treatment (Solution algorithm). |
|
|
|
The anisotropic operator with \(\beta_v/\beta_h\) = 1, 0.5, 0.1 ( |
|
\(\beta = 1\) gives the no-coefficient path bit for bit (iterations, solution, fluxes); \(\beta = 2.5\) on every face gives \(\phi/2.5\) and the same fluxes (to 1e-9; single 1e-4). Both paths are this layer’s; there is no separate plain projection to compare with. |
|
On a ramp (slope 0.15) crossing the Neumann faces, their fluxes and the ground’s are exactly zero, and \(\sum J\,A\phi\) equals the flux out of the Dirichlet top (1e-12; single 1e-4). |
|
Operator and fluxes agree cell by cell, \(A\phi = -\nabla_h\cdot F\) (1e-12 of
\(\max|A\phi|\); single 1e-4), with varying coefficients and |
|
Projection: the divergence of \(u + F\) is below 10 × tolerance of the divergence of \(u\), and equals the residual of the solve. |
|
Symmetric hill and right-hand side: \(\phi\) mirror-symmetric to 1e-12 of \(\max|\phi|\) (single 1e-5), Neumann and Dirichlet sides. |
|
Preconditioner, with bounds 10 % above the counts measured: 19 iterations isotropic (more than
10 times as many without it); 16 for \(\beta_v/\beta_h = 0.1\) told the ratio (at most 3 more than
isotropic; not told, more than 1.5 times as many); 29 for \(\beta\) varying over 100 times. A singular
problem reports and removes the mean. Option and BC checks, coefficients that are not positive, MultiFabs on
another layout and a solve that does not converge each stop with the input named.
|
|
Back end B ( |
|
Back end A with a Dirichlet ground: order ≥ 1.9 for every lateral BC and top. |
|
Spatially varying coefficients, Neumann and Dirichlet ground, 3-D with non-periodic sides (Neumann x, Dirichlet y and top): both back ends solved to 1e-12 give \(\phi\) within 1e-9 of max \(|\phi|\) (single: 1e-5 and 1e-4), and the fluxes satisfy \(\nabla_h\cdot F = -\mathrm{rhs}\) to the residual. |
|
|
|
Tucker distance against the exact distance with ERF’s tolerances on ERF’s decks: flat ground (max relative ≤ 3e-3, ≤ 0.1 m below 100 m; single 1e-2 and 0.5 m), 2-D ridge and 3-D hill (max relative ≤ 0.15, mean ≤ 0.03, ≤ 0.2 cells below 100 m); the 3-D hill with periodic and Neumann sides; both back ends (back end B on 64-cell boxes, under CI’s trap). Single precision solves to 1e-4. On flat ground the error converges at second order (32, 64, 128 layers; double precision). |
|
No node of |
|
\(\alpha_h = \alpha_v = 1\): the initial field equals the Poisson layer’s plain projection of the same first guess (the solve without coefficients, applied the same way) bit for bit, \(\lambda\) included; \(\alpha_h = \alpha_v = 2\) gives the same velocity within 1e-9 of max \(|u|\) and \(\lambda/4\) (single: 1e-4); the scalar state is untouched by the correction. Scaling the whole z flux by \(\alpha_v^2\) instead of the cross part by \(\alpha_h^2\) gives a different field; with periodic sides the hill case is divergence-free as a singular problem and the seam ghost of \(u\) is the corrected periodic image; a \(\lambda\) handed in with garbage is zeroed first; the divergence after is measured, not assumed. |
|
The divergence after the correction is below 10 × |
|
Flat terrain, open and periodic sides: the profile is divergence-free, so \(\lambda\), \(w\) and the divergence stay below 1e-12 and \(u\) equals the log law at every x face’s height (single: 1e-4, 1e-5). |
|
D4 symmetry: on a square domain with a Gaussian hill, the wind along ±x and ±y (its own inflow and outflow
faces each time) gives fields that are the eight transforms of each other: the cell-centred velocity vector
maps with the transform’s matrix, \(w\) and \(\lambda\) as scalars, within 1e-12 of the maxima (single
1e-5), with the solve converged to round-off ( |
|
The speed-up above the summit (four central cells a quarter of the depth up, over the profile at their height) falls by more than 0.01 at each step of \(\alpha_v\) = 1, 0.7, 0.5, 0.3, 0.1 (1.015, 0.998, 0.975, 0.943, 0.913 on the 1 km test domain, whose open faces are 500 m from the summit), and \(\alpha_h = 2, \alpha_v = 1\) gives the same value as \(\alpha_v = 0.5\) (the ratio alone matters; 1e-9). The preconditioner is told the ratio: at most 21 GMRES iterations at every ratio (13 to 19 measured). |
|
The first guess over sloping terrain: \(u\) at every x face, the two ghost layers included, and \(v\) at every y face equal the profile at the face’s height above its column’s ground with the 3 m floor (the floor acts on the ground faces and the ghosts below); \(\theta\) equals the sounding by absolute height; \(k\) the profile’s value with the decay above 200 m, and \(u_*^2/C_{\mu 0}^2\) everywhere without it; \(p' = 0\); \(w_0 = 0\) except on the ground faces, which carry no flux (\(\Omega_0 = 0\) to round-off); every ghost cell of the state is written (no NaN from the allocation); the O’Brien pass refuses a layout whose boxes do not span the column. |
|
O’Brien: \(\Omega_0\) vanishes at the ground and the top exactly, the divergence left in every cell is the weight difference \(f_{k+1}^2 a_{z,k+1} - f_k^2 a_{z,k}\) (\(f\) the height fraction, which the test shows differs from the index fraction on the stretched mesh) times the column’s residual (1e-11), the column sum equals the residual flux, the residual the function returns equals the largest column’s; through the initializer the correction starts from a different divergence than without O’Brien (not a lower one: the terrain-following first guess is already consistent at the ground) and gives a different \(w\). |
|
Inputs: \(z_{agl,\min} < 0\) or NaN, \(\alpha_h \le 0\) or infinite,
\(\alpha_v < 0\) or NaN, \(z_i < 0\), and any key other than |
|
The split anisotropic operator ( |
|
The step floor ( |
|
The local pseudo-time step on known fields: uniform \((u, v, w)\) and \(\nu\) on a flat uniform mesh give \(\mathrm{CFL} / (|u|/\Delta x + |v|/\Delta y + |w|/\Delta z + 2\nu(1/\Delta x^2 + 1/\Delta y^2))\) in every cell to 1e-14 (single 1e-6; the hill cases 1e-12 and 1e-5), without \(\nu\) the diffusive term is gone, a field at rest without diffusion gets the floored step, \(u\) varying in \(x\) gives the face mean per cell, a terrain-following field (\(\Omega = 0\)) over a 120 m hill has no vertical term and a plain \(w\) over it the term \(|w| / (J \Delta\zeta)\) cell by cell; a non-positive or NaN CFL and a face layout are refused. |
|
The SER ramp on a geometric residual (rate 1/4): CFL 1, 1, 1, 4, 16, 64, 64, 64 ( |
|
Switch rules on scripted residuals (\(W\) = 5, threshold 0.01, back growth 10): a residual alternating
about the threshold never switches; five iterations below switch forward at iteration 5 with the reason
naming |
|
A new run records the norm (driver history format 4) and a write and a read keep it; a format-3 file reads as not recorded, and a restore from it says so in the log; a norm other than 0 or 1 is refused. |
|
Node heights one ulp above this build’s, or ±32 ulp of the top level’s height, restart, and the run continues on this build’s heights; ±128 ulp, 64 000 ulp and a NaN node stop it (before, any difference did). |
|
The mesh keeps the smallest \(J\) when it makes its metrics (the pressure correction reads it
every iteration). After |
|
The history written to |
|
A residual that becomes infinite or NaN stops the run as |
|
\(a_P\) on every x-, y- and z-face equals \(1/\Delta\tau\) plus the diagonal of |
|
The z-line solve (the vertical upwind weights of \(A_1\) included) against a dense direct solve of the same system, assembled independently from the coefficient fields: on a single column (1 × 1 × 12, periodic sides, the lagged neighbours are the column itself) to 1e-12 after 60 sweeps (single 1e-4), and on a 3-D problem (4 × 4 × 6, periodic, \(\Delta\tau\) = 20 s) to 1e-10 after 400 sweeps (single 1e-4); in both cases the error falls at every doubling of the sweeps (1, 2, 4, 8, 16), the last sweep’s change is below the same tolerance and the ghosts outside the domain stay 0. |
|
\(\alpha_u\) relaxation equals pseudo-time relaxation: with \(\Delta\tau = \alpha_u/(1-\alpha_u)/ \mathrm{diag}(A_1)\) on every face, \(a_P = \mathrm{diag}(A_1)/\alpha_u\) to 1e-12 (single 1e-5) and the converged correction of u, v and w equals the dense solve of the relaxed system to 1e-12 (single 1e-4). |
|
Fixed point: a uniform wind over flat ground with uniform pressure has a residual of exactly zero and the predictor changes nothing (\(|\Delta q| = 0\); with a zero right-hand side the solve is zero for any coefficients, so this follows from the residual); a perturbation of \(u\) at one face is pulled back: one predictor step with \(\Delta\tau\) = 10⁴ s and 50 sweeps lowers max \(|R_u|\) below 0.75 of its value (0.56 measured; the pressure and the transport are frozen in the step). |
|
|
|
With boundary conditions (inflow at xlo, outflow at xhi, slip ground and top), the Dirichlet rows (the inflow face of u, the ground and top faces of w) have \(a_P = 1\), \(d = 0\), and one predictor step sets them to the boundary value exactly for any \(\Delta\tau\) (the inflow faces then have a zero residual row); every other row has \(a_P = 1/\Delta\tau + \mathrm{diag}(A_1)\) and \(d = a_P - \sum a_{nb} > 0\). |
|
The same state on one box and on 2 × 2 boxes (the lagged neighbours cross the box seams through the ghost exchange) gives the same corrected u, v, w, \(a_P\), \(d\) and face step to 1e-12 (single 1e-5). |
|
With the Coriolis coupling on, six boxes on their ranks and in reverse give the same u and v update
bit for bit (the level mean is a fixed-order sum; with the atomic sum it differed by 2.2e-16 on 2 and 4 ranks).
On one rank the two maps are the same, so only the 2- and 4-rank runs can fail. The mean’s value is pinned by
|
|
The w rows’ VNN cap ( |
|
The slope-aware cap ( |
|
On flat ground (several boxes) the cap \(V = 20\) with margin 4 and with margin 0 gives the same w rows (\(a_P\), \(d\)) and the same u, v and w, bit for bit; the cap itself changes \(a_P\). \(1/20\) is inexact, so a regrouped term would differ. |
|
One pressure correction of a predicted velocity (random wind, slip ground and top, periodic sides) leaves a divergence below the Poisson tolerance of the predicted one (0.1 and 1e-10, 2-norms), the ground and top faces of w untouched (\(d = 0\)), \(p\) changed from a random start by \(\alpha_p\) times the potential (\(\alpha_p\) = 1 and 0.7); the stage’s iterate reports the same divergences and six residual norms. |
|
Poiseuille flow between no-slip walls (uniform mesh, 16 layers, \(\nu\) = 10 m²/s, F = 1e-4 m/s²): the stage
at CFL 10 reaches the discrete closed form \(u_k = (F/2\nu)(z_k(H - z_k) + \Delta z^2/4)\) (the odd mirror of
the walls) to 1e-13 of \(u_{\max}\) (single 1e-5) in under 400 iterations; w, v exactly 0, \(p'\) at
round-off, θ and k untouched; one more iteration changes u by less than 1e-14 (the fixed-point check, also run on a uniform state in
|
|
The lid-driven cavity at Re 100 (64 × 64 in x–z, two periodic cells in y, no-slip walls, the lid at U = 1, \(\nu\) = 0.01) run by the driver (four sweeps, CFL 1 → 4) to its verdict: u on the vertical centreline and w on the horizontal one within 0.01 U of Ghia, Ghia and Shin (1982) at their tabulated points (measured 0.0045 and 0.0083; 1760 iterations, 14 s); nothing varies in y. |
|
With \(d = 1/\Delta\tau\) on every interior face and \(\Delta\tau\) = 1e3, 1e6, 1e9, the corrected velocity equals the plain projection’s to 1e-9 of U (single 1e-4), \(\Delta\tau\,p'\) equals the projection’s potential to 1e-8, and the divergence falls to the solver tolerance: no breakdown as \(\Delta\tau \to \infty\). |
|
With the closure and a strong random wind, k stays at or above the floor after each of five iterations: a floor of 1.5 above most of the initial k (the clip acts and its count is reported) and a floor of 1e-6 below every value (the natural case: no cell is clipped), every field finite. |
|
A uniform wind with slip walls has a residual at round-off and a full iteration changes every field by less than 1e-14 of its scale (the Poisson solve of a zero right-hand side returns round-off); the monitors are the speed and the mean k. |
|
The point-implicit buoyancy and rotation of the predictor pinned against their formulas on a
random stratified rotating state, with |
|
The moving lid and lateral walls: the ghost of u above a moving top is 2U − u, the ghost of w beyond an x wall is −w, u is 0 on the x walls (2 n_y n_z Dirichlet rows), and the checks refuse a wall velocity on another face type, a normal component and a non-finite value, and a lateral surface layer. |
|
The readers of |
|
The wall-k rows folded into the implicit rows: with a surface layer the first cells’ k
rows are, for |
|
Over a 60 m hill (and over flat ground) the ground and top faces of w take the no-flux value after the fill: Ω vanishes on every ground and top face to 1e-12 (it is 0.1 or more before the fill on a random w), the two ghost layers mirror about the face value, the lateral ghost columns of the face rows are the periodic images of the valid faces, the Dirichlet rows of the residual vanish, and the homogeneous fill of a perturbation gives the same linear relation; over flat ground the value is 0. |
|
The Rayleigh layer’s fields and height: with |
|
One and two symmetric line LU-SGS sweeps on a 6 × 3 × 4 box (cells and x faces; non-periodic, and periodic cells where the seam couplings are the previous pass’s values) equal a dense block-triangular reference (the forward and backward solves with the lower or upper x/y couplings and every z coupling in the matrix, the rest on the right-hand side) to 1e-12 of the solution; 40 sweeps reach the dense solution of the full system to 1e-11. |
|
Pure first-order upwind convection along x on a non-periodic box, wind in +x or −x: one symmetric sweep equals the dense solution to 1e-12, a second sweep changes nothing (1e-13), and two z-line Jacobi sweeps are still 1e-3 off (the lag). |
|
The real \(A_1\) of u (implicit vertical advection and diffusion, the principal diffusion) on a periodic 4 × 4 × 6 hill mesh with a uniform wind of either sign at Δτ = 20 s: the LU-SGS error falls with every sweep, is below the Jacobi error after four sweeps, and reaches 1e-10 of the dense solution after 40. |
|
The scalar sweep of k with |
|
A zero right-hand side gives a zero correction and zero change for one and three sweeps; the dispatcher
routes by kind ( |
|
The in-memory table profile evaluates its table (exact at the heights, linear between, constant beyond) and
refuses a first height ≠ 0, non-increasing heights, θ ≤ 0, k < 0 and a single row; with the column override the
first guess takes u, v and k from the table at the cell-centre heights of a flat mesh (1e-13) and θ from the
sounding, and the override is required; |
|
The 1-D column on 16 levels over 1000 m under the flat deck’s sounding with the hill decks’ Rayleigh layer on w and θ: converges within the limit, the ground row at z = 0, heights strictly increasing, u and v bounded, v > 0 near the ground (the Ekman turning at latitude 90), the geostrophic wind at the top within 0.5 m/s, k at the floor in the inversion and largest near the ground, the first cell’s k = u*²/C_μ0² (1e-12), u* in 0.2–0.6 m/s, the table identical on every rank. |
|
The stratified column ( |
|
The column first guess with a canopy (the 1-D part): under a dense uniform canopy (f = 0.5 1/m over
the lowest 40 of 64 layers, a pressure-gradient force F, no rotation) the layers at 10 to 30 m have
\(|W| = \sqrt{F/f}\) and \(k\) the root of \(\beta_p |W|^3 = \beta_d |W| k + C_{\mu 0}^3
k^{3/2}/\alpha\), both within 1e-3 (double), and v = 0; with |
|
|
|
The time-marching column ( |
|
QNSE’s φ and ψ against Python values at ζ = 0.1–100 (φ to 1e-14, ψ to 1e-13) and with distinct coefficients per function, ψ against a Simpson integral of (1 − φ)/x (1e-10); the unstable side and the default equal ERF’s Businger–Dyer functions; the 3-D u* with QNSE matches a bisection (1e-10) and is 8 % above Businger–Dyer’s at ζ = 0.087; the ground ghosts take QNSE’s φ; the keys are read and checked by name. Twelve one-line mutants are caught. |
|
On 1, 2 and 4 boxes (an uneven 7 × 6 split and a 2-D 8 × 1 mesh too), periodic and not, the owned regions cover every cell and every x, y and z face exactly once (periodic images identified, an image owning nothing); the box-local sweeps (zero ghosts, \(n_o\) = 0 and 2, one and two sweeps) equal a host replay written from the ownership rule (1e-13 of the largest value); on one non-periodic box the zero and lagged ghosts give the same result, bit for bit. |
|
A 16 × 8 mesh in 4 × 2 boxes with a strong x coupling (cells and x faces, periodic and not): the outer defect correction with two box-local sweeps per step reaches \(|r| \le 10^{-12}|b|\) for \(n_o\) = 0, 2 and 4, the three states agree to 1e-10, and the outer iterations fall strictly with \(n_o\) (122, 54, 49 non-periodic). Two boxes of four columns with \(n_o = 4\) reproduce the one-box sweep bit for bit, and differ from it with \(n_o = 0\). |
|
A 16 × 16 mesh in 1, 4 and 16 boxes (cells, x and y faces, periodic and not; zero ghosts with \(n_o\) = 0 and 2, and the lagged ghosts): the converged states agree to 1e-10. The box-local sweeps depend on the box shape, so the test is of the converged state, not of the iterates: one step is checked to differ between the layouts. |
|
The diagonal wavefront ordering equals the sequential sweep bit for bit (the correction and the reported
change): every location, 1, 2 and 4 boxes, periodic and not, one and three sweeps, the lagged ghosts and the
zero ghosts with \(n_o\) = 0 and 2. A per-rank launch counter ( |
|
The refusals naming |
|
The alternating ordering ( |
|
Three levels of a stretched mesh (dz0 = 40 m, the ratio solved by Newton), flat and over a round STF hill: every level’s z-levels equal level 0’s bit for bit, with the same nz and z extent and x, y halved per level; on flat ground every node of every level sits at its z-level exactly. |
|
The pass counts \(p(q^l - 1)\) pinned for p = 0 to 3, l = 0 to 4 and q = 2, 4; for three levels at
q = 2 and two at q = 4, each level’s domain, box array (level 0’s coarsened by \(q^l\)) and
|
|
Free-stream preservation on every level for BTF, STF and Sullivan: the metric divergence of a uniform (10, 5)
m/s wind below 1e-12 of \((|U| + |V|)/\Delta x\) of the level; the coarse grounds are not flat. Run at
|
|
Flat terrain, three levels (16 × 8, 8 × 4, 4 × 2 × 24 cells, stretched): (a) each level’s own Poisson solver gives the same φ column for a right-hand side in z alone; (b) the full residual of a conventionally neutral column state (the k-L closure, the surface layer, Coriolis with a geostrophic wind, a capping inversion with buoyancy) has the same u, v, w, p, θ and k columns on every level, so every level has the same column solutions; (c) ten SIMPLEC iterations keep every column of a level alike. Relative 1e-12. Part (b) compares the steady equations rather than iterates; the pull request that added the test gives the reason. |
|
Every invalid hierarchy input gives one message naming the key (n_cell x or y not divisible, levels beyond
the cells, a box size not a multiple of the coarsening, levels 0 and 11, passes −1 and 65, passes without a
hierarchy), and |
|
A level gathered onto one box equals the distributed level (8 boxes) bit for bit: node heights with ghost
nodes, |
|
A 32 × 24 × 10 mesh in 6 boxes of unequal size (non-periodic x, periodic y), three
levels, flat and over a round STF hill (150 m, half width 300 m), level pairs 0 → 1, 1 → 2 and 0 → 2: every
coarse face flux equals the sum of the fine ones it covers (\(a_x u\), \(a_y v\), \(a_z \Omega\))
to 1e-12 of the largest flux; θ, k and p′ equal the |
|
Over the hill, two levels at ratio 4 against three at ratio 2 (same level 0): the ratio-4 level 1 has level
2’s box array and 3 passes, and its node heights and |
|
Prolongation of a smooth level-1 state onto level 0 (inflow, outflow, surface layer, slip top, periodic y),
flat and over the hill, with |
|
Flat ground, periodic in x or in y, the three level pairs: a field bilinear in x and y (a tent of the period in the periodic direction, with its kinks on coarse points of the field’s type) is reproduced at every fine point of each of the six fields, up to the non-periodic faces and across the seam, to 1e-13 (2e-6 in single precision). The coarse ghost cells are set to 1e30, so a read of them would show. |
|
A coarse k between −6e-5 and 1.8e-4 against a floor of 1e-4 (the interpolant is negative somewhere and below
the floor in more than 100 fine cells): after |
|
With levels 1 and 2 gathered onto one box, restriction and interpolation between every pair, and
|
|
restrict(prolong(c)) on flat ground, periodic in x or in y, against the closed form: \((c_{I-1} + 6c_I + c_{I+1})/8\) along a cell-centred direction (the identity in the first and last cells next to a non-periodic face), the identity along a nodal one, for a non-smooth coarse field; to 2e-14 (2e-6 in single precision). |
|
Over the hill, for the three level pairs: |
|
32 × 4 cells, periodic x, walls in y, three levels: level 2 is one cell wide in y. A tent in x, constant in y,
prolonged from level 2 to levels 1 and 0, is reproduced at every fine point of each field to 1e-13 (2e-6 in
single precision). A read of the coarse image’s unfilled ghost cells shows as a NaN under |
|
Level pairs (1, 1), (2, 1), (−1, 1) and (0, 3) abort in |
|
The loose stop on synthetic histories, pinned by an independent Python implementation: three residuals (one
peaking at its third value, one below |
|
|
|
|
|
The rotation’s pin holds the planar-mean split: \(a_P\) with \(f^2\max(\tau_c, \tau_{\mathrm{own}})\) and the right-hand side with the unique-face horizontal mean of the other residual per level at \(\tau_c\) and the fluctuation at \(\tau_{\mathrm{own}}\). |
|
Steady-criterion verdicts on converging, stalling (including a residual stuck exactly at the tolerance) and oscillating histories. The converging history becomes steady at iteration 136, pinned from an independent Python implementation of the definition. |
|
A NaN or infinite residual or monitor gives |
|
A monitor at round-off level around zero is steady with scale 1 and never steady with a scale below the noise. |
|
The monitor window needs \(W+1\) values; a change of exactly the tolerance passes and one just above it does not (values exact in binary). |
|
The residual drop is measured from the early peak (iteration 38), not from the first value (iteration 49). |
|
Parameter range checks name their keys; bad or missing monitor scales and size mismatches stop. |
|
A monitor converging at rate 0.999 stops at iteration 4602, within the tolerance of its limit; the window test alone would stop at 1615 with a 2 % error. |
|
Undamped oscillations with periods of 37, 100 and 200 iterations are never steady. |
|
A residual that is zero over the reference iterations does not block the stop. |
|
A criterion restored from a saved history gives the same verdict at every later iteration as one never interrupted; a mismatched history is refused. |
|
A slowly growing monitor is not steady while its change over the window is still small. |
|
Input parsing; unknown, repeated, multi-valued and out-of-range keys reported with their names. |
|
Plotfile round trip, bit-identical, including the nodal heights and their ghost nodes. |
|
Checkpoint and restart onto another box layout, bit-identical; ghost nodes restored without overwriting
valid nodes; a checkpoint written with one ghost cell on the solution fields (the earlier
layout) restarts bit-identical. |
|
A checkpoint on a stretched mesh ( |
|
A parent field bilinear in x and y with a different slope on each level, at each field’s own staggered point, is reproduced on every patch point, ghosts included (the z ghost rows equal the nearest level), on flat ground and over a hill (relative 1e-11; 2e-5 in single precision). |
|
A patch outside the parent, within 2 parent cells of a low or high face, misaligned by 30 m or 25 m, at
ratio 4 or 1, on other z-levels (cell count, top or |
|
A format-1 checkpoint still restarts, but as a nest parent stops naming |
|
A smooth, not bilinear parent field interpolated with four pairs of parent and patch box layouts (one box
each, several, and rank maps in reverse order) gives the same patch values bit for bit; run on 1, 2 and 4
ranks by the |
|
A patch reaching a periodic parent’s face (its ghost cells cross the seam) and a periodic patch spanning the parent read the periodic neighbours: both match a host interpolation that wraps the index. Run at ratios 2, 4, 8 and 16. |
|
The bilinear test of |
|
A patch with r times the parent’s cells is accepted at r = 2, 4, 8 and 16, and at ratio 16 with the 2-cell
margin to the parent’s high faces (1 cell is refused); the ratio-2 patch at ratio 4 and the ratio-4 patch at 2
and 8 are refused naming |
|
|
|
A patch over a hill with four nest faces and a parent field whose net flux is above 1e-3 of the flux entering:
the reported net, flux entering and δ equal sums made on the host from |
|
With an outflow face the parent’s values are kept and δ = 0. The net, the weight and δ are the same bits with the rank map reversed. |
|
After |
|
With |
|
A nest with a blended ground ( |
|
A joint run’s nest ( |
|
The rate at every point of u, v, w and the cell centres equals \((1 - s/N)\,f\max(0, U_\mathrm{in})/(N\Delta x)\) computed on the host (corners add; zero where the parent’s flow leaves and beyond N cells), and the source equals \(c\,(q - q_\mathrm{parent})\) for each of the five fields. |
|
The diagonal added for each equation equals the rate at its points, and equals the finite difference of the source for a perturbation of the field. |
|
With |
|
The summary warns, naming |
|
Each range and combination fault of |
|
A parent whose surfaces are quadratic in x and y comes back exactly at every valid and ghost node of a joint
nest ( |
|
On a hill parent with an uneven patch layout, for an arbitrary nest field: on every footprint cell the parent’s \(J\,\nabla\cdot\) after the restriction is the mean of the nest’s over its 2 × 2 cells (u, v and \(\Omega\) restricted as fluxes), so a divergence-free nest field gives a divergence-free footprint. |
|
A parent periodic in x and a footprint starting at its face 0: after the restriction u on face 0 and on its periodic image, face 20, agree. |
|
θ linear in x and y on flat ground comes back at the parent cell’s centre exactly; k constant on the hill is unchanged by the \(J\) weights; p is the \(J\)-weighted mean shifted by one constant that keeps the parent’s footprint mean; outside the footprint every field keeps its values bit for bit. |
|
A constant added to p over the footprint leaves the parent’s residual unchanged on the source’s region
( |
|
u, v, w, θ and k of the restriction are bit for bit the same for two nest box layouts and rank maps, on 1, 2 and 4 ranks. Each layout builds its own node heights (before, both took one single-box build, since under gcc the BTF heights changed with the layout). |
|
Two nests that touch along a parent face, with different u on it, restricted by |
|
Made-up face fractions on flat ground, partly open, closed and open faces on both levels: u, v and \(\Omega\) are the nest’s open-area flux over the parent’s open area, against values by hand (\(8/3 + 0.1k\), \(2 + 0.05k\), \(3 + 0.1k\) for u and v, \(2.4 + 0.1k\) for \(\Omega\)); a parent face closed in full gets 0 and stays finite. With the full areas the values are \(3 + 0.1k\) and \(2.5 + 0.1k\), and the test fails (mutants D12–D19). |
|
|
|
Two overlapping footprints on a parent of 20 × 16 × 8 cells (dx 100 m, dy 80 m) in boxes of 7 × 6, with
non-uniform u, v, w, θ and k: on every point of every location the rate is
\(\max_g w(s_g) f U_g / \min(\Delta x, \Delta y)\) computed from the point’s position ( |
|
A footprint spanning a periodic y: the rate does not fall towards the y ends, and falls to 0 at the x faces. |
|
A footprint from face 0 of a periodic y that does not span it: the closed form with y faces, and a rate of 0 on both copies of the seam face (0 and its image 16). |
|
On a hill, the residual and the implicit diagonals with an unset |
|
On a hill, the residual with the source minus the one without equals \(c(q - q^*)\) on every row the boundary conditions keep, and 0 on the rows they replace (40 ground and top w faces and 20 wall-k cells in the footprint) and outside the footprint; continuity’s residual is unchanged. |
|
For each equation, the implicit diagonal with the source minus the one without equals the finite-difference derivative of the residual’s change, point by point; no other coefficient changes. |
|
U and the rates at every point: bit for bit the same with the boxes of 7 × 6 on reversed ranks, and the same to
round-off with one box; on 1, 2 and 4 ranks (on 1 rank the reversed map is the same map, so that half
acts in |
|
|
|
Two small footprints on boxes of 4 × 4 cells (12 of the 20 boxes hold no footprint point, 3 are reached by one footprint’s margin alone): with \(R\) and \(A\) preset, every point where the closed-form rate is positive gains \(c(q - q^*)\) and \(c\) on the diagonal, every other point and every off-diagonal coefficient keeps its value bit for bit; on 1, 2 and 4 ranks. Mutants X11 to X13 fail it. It checks that no box with a footprint point is skipped; the cost saving itself is not visible in values. |
|
A flat parent of 20 × 16 × 8 cells in boxes of 7 × 6 with two overlapping footprints: the term
|
|
A periodic hill of 16 × 2 × 12 cells on four boxes, a footprint over cells 3 to 12 in x: the outer residual
with the source at \(q = q^*\) is zero where \(w = 1\) and
\((1 - w) R_c(q^*)\) on the margin; with |
|
The implicit coefficients with |
|
A domain name of up to 24 characters is logged as it is; a longer one as its first 12 and last 9 characters
around |
|
On the hill parent, a full injection sets u, v, w, p, θ and k to the restricted nest on the inner box’s points
(faces from L to H + 1 along their normal; w’s 96 ground and top faces are boundary values and keep the
parent’s) and leaves every other point bit for bit; an injection at the default factor moves the inner box
halfway (to 1e-6 relative) and nothing else. After the full injection the inner cells above the ground layer
carry the nest’s \(J\,\nabla\cdot u\) (its 2 × 2 mean; the ground cells read the ground w the
application’s fill sets, which |
|
Two regions, one spanning a periodic y (no y faces), on boxes of 7, the same on reversed ranks, and one box:
|
|
On the hill, an inactive |
|
The converged hill with a target of 1.1 times its velocity on the inner box, injected at the default factor
before each SIMPLEC iteration: the first iteration leaves all six fields on the inner box at the injected
values exactly (w’s ground and top faces are boundary values); the residual falls 6 orders (100 iterations);
the state outside the box moves (0.83 m/s); every x-face column carries 1.1 times the converged volume flux
(closed form, periodic channel; error 5.3e-10 against 1e-6); on 1, 2 and 4 ranks. In single precision the
steady criterion cannot be met on this hill: v is 0 (2-D), so its residual is round-off from the start (the
relative residual stays at 0.02, and a drop of 4 orders from |
|
|
|
The pressure-correction solve with |
|
The target’s change that the joint run’s stop window reads: at \(\omega = 0.4\), the first injection’s change is \(\omega \max |q^* - q|\) and the second’s \(\omega (1 - \omega) \max |q^* - q|\) over the inner data points, with the target’s largest velocity component and largest k as the sizes (θ none), computed from gathered fields on boxes of 7 and on reversed ranks; never marked as a first exchange. |
|
The enclosed solid block of |
|
The joint record ( |
|
An L-shaped block with two tops and a lifted deck on sloping ground: a patch (16 × 17 cells in boxes of 5 × 6) builds the solid fractions, the three face fractions and the wall cells bit for bit as the whole domain (32 × 32 cells in boxes of 16) on the same cells, with more than 100 solid and 50 wall cells in the patch. |
|
A building tile within \(2\Delta x + \max(N\Delta x, W)\) of a nest face is named with its extents and
the face; a tile whose edge is on the gap’s inner edge is clear, one cell further in is not. Each of the four
faces and a corner tile (named twice); |
|
|
|
Comments, tabs, Windows line ends, a UTF-8 byte-order mark and a hex float are read;
|
|
The column table ( |
|
The sum gives the same bits on 1, 2 and 4 ranks and within 16 ε Σ|x| of the exact sum; the maximum
handles NaN and −0. |
|
On a residual that is exactly quadratic in q (upwind convection, Coriolis, slip walls), the analytic \(Jv\)
and \(B(v,v)\) from central differences; the sweep of |
|
Plain Newton on the Ekman column; the reductions 0.403, 0.171, 0.0131, 2.09e-4, 8.26e-8 pinned to a factor 2, the last two steps above the round-off floor gain more than three orders each, and \(r_{n+1} \le r_n^2\) after the first step. In single precision the first three reductions are pinned and the last two steps sit on the forward difference’s floor (they depend on FMA contraction); the single-precision CI job compiles only, so this branch runs on request. |
|
|
|
|
|
Added after #19. |
|
The 30 m hill with \(u\) three times larger, plain Newton throughout, GMRES(30) stopped at 200 iterations.
Plain |
|
Given a sequence of \(|R|\), the CFL after each accepted step equals the closed form
\(\min(\mathrm{CFL}_\mathrm{max}, g\,\mathrm{CFL}_n, \mathrm{CFL}_0(|R_0|/|R_n|)^p)\) for four SER
settings, with a flag per setting for whether the growth limit and the cap bind (each asserted); the switch to
infinite \(\Delta\tau\) at the cap (and not with |
|
|
|
|
|
On a terrain hill split into six boxes (shared and periodic faces), with non-uniform fields and
\(\Delta\tau\), |
|
On the periodic hill (singular pressure problem), a constant added to \(r_p\) or to \(q\)’s \(p\)
leaves |
|
Four Newton steps on the open hill (9 × 6 × 8, six boxes) at CFL 10, 1e2, 1e3 and 1e4. With |
|
|
|
The 2-D periodic hill with a capping inversion (8 × 2 × 8 cells, two boxes, the k–L closure, the wall law,
Rayleigh damping of w and θ at the top). From the SIMPLEC state at \(r\) = 1e-4: |
|
The same test: the smooth-limiter Newton solution differs from the van Leer SIMPLEC solution by at most 2 % of the largest \(u\) in \(u\) and \(w\), 0.01 K in θ and 5 % of the largest \(k\) in \(k\) (1.1 %, 0.09 %, 7e-5 K and 3.2 % measured), and by more than 0.1 % in \(u\) (the limiters differ). |
|
|
|
Synthetic histories with |
|
The same test: a second stage that asks to go back from its second iterate is left at once (iteration 9,
inside the hysteresis window), its |
|
|
CTest |
|
|
The named set-ups |
|
The building geometry (Buildings): cell and face fractions of a box on flat ground are the exact overlap; on a slope each column holds the map’s volume from the local ground; wall masks and distances equal hand values; the same bits on every box layout, across a periodic seam; bare columns hold nothing; ERF’s cube file and the two file formats; a void deck is open with a wall under the building; the reference distance on stretched layers; round-off leaves solid cells solid; the checkpoint’s hash changes with the building inputs, and a checkpoint written without buildings is refused; files and inputs are checked. |
|
The buildings’ momentum terms: the wall law returns \(u_*\) of an exact log profile, with its blend floor and with no reference cell; the sink, its diagonal and a closed face; part-covered walls and open fluxes; the drag form has fixed rows only; a pocket under a lifted building is sealed, and the cell labels of that count stay distinct above \(2^{31}\) cells (2048³). On the sides: the log law’s stress on both parallel components; edge and corner cells sum their walls; rates use the cell size along each normal; partly blocked cells and a sloped roof’s side; the viscous fluxes and couplings through a side are closed; a block across a periodic seam; the restart hash follows the law. |
|
The buildings’ terms of the closure: the wall distance in wall cells is the fluid centroid’s; the distance to a block, to an L with a step, beside a step between two roofs and across a periodic seam equals the closed form of the boxes; where the ground is nearer its distance is kept, and the length takes the nearer wall’s own roughness; wall cells relax to the law’s value and solid cells to the floor; several walls give the largest \(u_*\) and the nearest distance; the diffusive flux of \(k\) is closed on blocked faces; the norm and the confidence leave solid cells out; the limiter zone (distance and building height, ghost ring, restart hash); option defaults and refusals. |
|
The buildings’ terms of \(\theta\): the walls’ heat exchange equals the closed form of the form 7 law; ambient walls exchange nothing at the reference profile; the implicit diagonal is the derivative of the exchange; the diffusive flux is closed on blocked faces; the wall heat is the sum of the cells’ exchange; the norm and the confidence leave solid cells out; option defaults and refusals. |
|
The lee-wake additions (Turbulence model): the realizability cap is the minimum with its closed
form and comes before the relaxation; the blend towards upwind and the update of \(\sigma\) against
its closed form, with its ghost cells at an open boundary; the residual blend limits, thresholds and
verdict flags; the confidence stop counts the converged cells; the relaxation ends below
|
|
The leaves’ heat exchange: the leaf area density is the drag field with \(C_d = 1\), also from a map, and the coarse levels keep each layer’s integral; the exchange rate’s pinned values and the source’s closed form; the residual and the diagonal; the frozen-\(\theta\) blend; the option checks. |
|
The roughness map of |
|
The residual’s persistent workspace: the wall state the ghost fill returns is the residual’s own, bit for bit; a workspace reused across states and layouts, poisoned with NaN before every call, gives the bits of fresh fields, also in the Jacobian-vector product with the refill (in double precision; to a few ulps in single). |
|
A checkpoint of frozen closure decisions records the canopy’s length cap: a restart with another
|
|
A checkpoint written before the renames ( |
|
The upwind blend reads the distance to the ground, not to the nearest building wall; the residual scales
use the depth of the stretched layers, not |
|
A joint record of version 2 reads with its window and no factor. A restart restores the window and the last
feedback with the recorded feedback and factor, with any factor from a version 2 record and never from a
version 1 record; otherwise the reason names both values. The round trip holds the factor bit for bit (1/3, 0
with |
|
Outflow ghost cells over sloping ground, with periodic sides; a joint record of version 1 reads without a
window (and one written as |