Skip to content

Unit tests ​

The unit tests pin the building blocks below the solver: the eigensystems, the fluxes and Riemann solvers, the positivity limiter, the WENO tables and weights, and the library pieces FLUME relies on (the tree lookup, the quadtree seam exchange, the Poisson solvers). Each device twin (_fnl) also asserts the device result equal to the host one.

FLUME ​

Sources in src/tests/flume/unit/.

TestWhat it pins
test_flume_euler_library (+ _fnl)Euler eigensystem, flux, Roe average, split consistency; RS(q, q) = f(q) for LLF/HLL/HLLC, HLLC exact on a contact, positive first-order updates; the si descaler of planar and static states within 108 of the largest (host); device = host
test_flume_mhd_library (+ _fnl)MHD, GLM and EGLM eigensystems (including degenerate states), fluxes, auxiliary variables, cyclic invariance; the si descaler of planar, field-free and static states within 108 of the largest; αf, αs to full relative accuracy at high and low β with B near the normal, against quadruple precision (#79) (host); device = host
test_flume_mhd_riemann (+ _fnl)MHD LLF/HLL/HLLD without cleaning, with GLM and with EGLM: consistency, HLLD exact on contact, tangential and rotational discontinuities, cyclic invariance bitwise, positive updates, EGLM = GLM bitwise at ψ=0; device = host
test_flume_positivityPV-0, the limiter on random admissible states with perturbed fluxes (Euler, MHD, EGLM): every limited update positive and above the relative floor, the limiter needed and acting; a NaN or infinite high-order flux replaced by the backbone flux; inadmissible face ghosts blended above the floors, every other value untouched; a cell with a 2:1 seam face (mean donor-state backbone) admissible for any seam factor up to its own, and not without the limiter
test_flume_weno_weightsNV-1 of issue #49, on SETH's kernels through the adapter since #139 S6: with [weno] weights = si, WENO(2nv) = 2n WENO(v) bitwise for every scheme, reconstruction and interpolation, random stencils from 10−12 to 1012; the js weights fail it (negative control); quadratic data reproduced by both; zero data stay zero
bash
fobis build --mode test-flume-<name>-gnu                         # host
fobis build --mode test-flume-<name>-fnl-nvf --varset local_nvf  # device twin

Library tests used by the FLUME cases ​

TestSourcesWhat it pinsCase
test_tree_closest_blocksrc/tests/amr/the tree lookup of the seam peers on binary trees, quadtrees and octrees, including a single-block tree (#54)multi-realm runs
test_quadtree_seam_ghost (+ -fnl-nvf)src/tests/amr/the 2:1 seam exchange on a linear field: octree, quadtree nk = 4 and nk = 1, 1 to 3 ranks; the device exchange equal to the CPU one, bit for bit (#46)quadtree AMR
test_poisson_fft (+ -fnl-nvf)src/tests/poisson/the FFT Poisson solver, periodic and isolated (SV-2, SV-6)FFT Poisson solver, isolated solver
test_poisson_mgsrc/tests/poisson/the multigrid Poisson solver on AMR grids (SV-9, SV-12, SV-13); --bc the boundary kinds per face, against the FFT solver on uniform grids and a manufactured potential on AMR (#84, E1b); --flail the FLAIL facade with them, bitwise against the solvers called directly, and per-component kinds as one instance per component (E1c)multigrid on AMR
test_flail_bc (+ -fnl-nvf)src/tests/poisson/FLAIL boundary kinds per face in the FFT solver: periodic, Dirichlet and Neumann at the face (mixed per axis, 2n/4n extensions), ghost-Dirichlet; round-off against per-axis discrete eigenfunctions, ghost layer included; D/D order 1.99 (#84, E1a). The same with the wide D(G) of order 2, 4, 6, 8 (PRISM's elliptic operator, E2a), its eigenvalue computed in real space, ghost layers to depth p; wide p = 4 D/D order against the continuum. Zero-ghost faces (PRISM's Dirichlet, E2b) by preconditioned CG: a manufactured solution, the ghosts against the rules, the iterations bounded in the grid. PRISM's own operators (E3a): div(grad phi) = f with the library's centred FD and FV derivatives of order 2–8, the solver's ghosts read, so FLAIL inverts exactly the operator PRISM applies. Free-space ghosts (PRISM's exact/open face, E3c): the ghost slabs against a direct Green's sum, D(G) phi = factor f with them, the same on 1–3 rankspoisson.sh --legs bc
test_seth_smoke (+ -fnl-nvf, -fnl-omp-amd)src/tests/seth/the SETH dependency (#139 S1): every WENO-JS width with its weights ratios and the scale-invariant descaler, 4096 faces, on the host and in one device loop; bitwise in the CPU build, within 8 eps on the device (the device compiler contracts other products into FMAs: 5 eps measured on an RTX 4070)every WENO case, from #139 S3
test_stepper_objectsrc/tests/rk/the SELAH adapter (#132): the scheme mapping, the stored fields, one step of y′=−y per scheme on an ADAM-shaped field (unmasked, masked, both layouts), the stage weights and times, the scratch registers. The tableaux themselves (order conditions, SSP coefficients, bitwise ADAM's former ones) are SELAH's testsevery case (the time integrator)

Build modes: test-tree-closest-block-gnu, test-quadtree-seam-ghost-gnu (-fnl-nvf), test-poisson-fft-gnu (-fnl-nvf), test-poisson-mg-gnu, test-flail-bc-gnu (-fnl-nvf), test-seth-smoke-gnu (-fnl-nvf, -fnl-omp-amd), test-stepper-object-gnu.

FLUME tests run by the verification legs ​

Host programs called by a leg of a verification check.sh, with the sources next to the case.

TestSourcesWhat it pinsCase
test_sgssrc/tests/flume/verification/turbulence/the pointwise subgrid-scale formulas (Vreman, WALE, Sigma) for velocity gradients read on stdin, compared by sgs_oracle.py with its own computation (#119, T1)SGS models, leg sg1
test_kepsrc/tests/flume/verification/turbulence/the central flux of the hybrid scheme on periodic lines along x, y, z: order ≥5.5 on every component (n = 32, 64, 128), the discrete kinetic energy identity within 10−12 of its scale, pressure equilibrium across a 100:1 step within 10−12 (#119, T2)hybrid scheme, leg hy3
test_wall_modelsrc/tests/flume/verification/turbulence/the wall models pointwise: the laminar limit, the log layer against a fine quadrature, the Crocco relation with Pr=Prt, the same under Sutherland's law, and the inverse-transformation model (#119, T3.4, T3.5)channel, leg wm2
test_inflow_dfsrc/tests/flume/verification/turbulence/the digital-filter inflow generator on its plane alone: the prescribed Reynolds stresses (layer sums within 3 %, every node within 10 %), the temporal and spanwise correlations, a periodic span, a bitwise restart (#119, T3.7)boundary layer, leg tb1
test_flume_user_criterionsrc/tests/flume/verification/regrid/the FLUME CPU driver plus a registered refinement criterion ([amr_marker_N] mode = 6) that reproduces the built-in box marker (#110, P4)multi-realm under runtime AMR, leg 10

Build modes: test-sgs-gnu, test-kep-gnu, test-wm-gnu, test-df-gnu, test-flume-user-criterion-cpu-gnu.