Appearance
Conservation across 2:1 seams and forest seams
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| VV-7 | Dissipative terms (M4) | M4 (#65) | CPU, FNL | yes | seam-viscous-amr |
Case and scope
A diagonal wave of large amplitude crosses 2:1 coarse-fine faces (one realm with its centre refined) and inter-realm seams (the same domain split into two realms). The conserved integrals are judged on the refined realm; the fields of the forest are judged against the single realm.
What the case catches:
- dissipative fluxes missing from the seam registers: the dissipative fluxes are added to the inviscid ones before the seam accumulation, so the Berger–Colella reflux and the inter-realm register must carry them. At a 2:1 face the coarse and the fine side compute different viscous, heat and Ohmic fluxes, and without the register the grid leaks;
- unfilled edge and corner ghosts: the dissipative stencils reach further than WENO's: the tangential derivatives read the edge and corner ghosts, which no inviscid stencil touches.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | Euler with | models, GLM |
| Dissipative fluxes | dissipative_order = 4, added to the inviscid fluxes before the seam accumulation | add_dissipative_fluxes, adam_flume_cpu_object.F90; numerics |
| Inviscid fluxes | WENO5 flux splitting, characteristic variables | compute_residuals_weno, adam_flume_cpu_object.F90 |
| Time | runge-kutta-ssp-54, CFL 0.2 | adam_rk_object.F90 |
| 2:1 reflux | Berger–Colella register of the seam fluxes, [numerics] reflux on or off | accumulate_seam_fluxes, reflux_stage, adam_flume_cpu_object.F90; accumulate_coarse_flux, accumulate_fine_flux, adam_flux_register_object.F90; numerics |
| Coarse-fine ghosts | the library's 2:1 ghost fill | boundary conditions |
| Forest seams | coupling = mirror (1:1) or refined (2:1), coupling_cadence = stage_coincident; seam ghost centres wrapped by one period along a tangential axis periodic on both realms | fill_seam_from_peer_forest, adam_flume_cpu_object.F90; wrap_periodic_tangential, adam_forest_object.F90; inter-realm seam |
| Conservation history | volume integrals written every step | compute_conservation, adam_flume_cpu_object.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Domain | |
| Ranks | 2 |
| Initial condition | sine-wave at 45°, |
| Final time |
| Leg | Grid | Boundaries | Runs |
|---|---|---|---|
refined box (conserve-*-quadtree) | quadtree, | periodic in | with reflux; without; without reflux and without the dissipative coefficients (the ideal twin) |
forest, mirror | the single realm split at | extrapolation (outflow) in periodic in | single realm; forest |
forest, refined | the single run refines refined coupling needs ratio 2 along every axis, null | extrapolation in periodic in | single realm; forest |
An octree with null
Input files
| File | Role |
|---|---|
src/tests/flume/verification/viscous/waves.py | make --refine ... --reflux, split (the two-realm forest), conserve (the drift oracle) |
src/tests/flume/verification/multirealm/multirealm_oracle.py | the forest union against the single realm (--fields-only) |
src/tests/flume/verification/viscous/check.sh --legs vv7 | runs the 6 refined-box runs and the 8 forest runs (--np N; FLUME_EXE selects the backend) |
src/tests/flume/verification/make_doc_figures.py --only seam-conservation | the figure, from the histories that viscous/check.sh --legs vv7 keeps (CPU) |
src/tests/flume/regression/seam-viscous-amr/input.ini | the frozen Alfvén wave, |
bash
cd src/tests/flume/verification/viscous && ./check.sh --legs vv7 # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh --legs vv7 # FNLResults

The drift of the mass and energy integrals per step, CPU. Left and centre: the acoustic wave on Euler and the Alfvén wave on MHD-GLM across a 2:1 box; with the reflux the integrals stay at round-off, without it they drift, and so does the ideal twin without the dissipative coefficients, so the drift is the seam, not the dissipative fluxes. Right: the forests (1:1 mirror and 2:1 refined, outflow in
Oracle (waves.py conserve). The drift of each conserved integral is divided by
- with reflux, every drift
; - without reflux, the largest drift
(the seams are exercised); - the leak without reflux differs from the ideal twin's by
: the dissipative fluxes cross the seams unmatched, and the first item shows the register removes that too.
| Case | With reflux (bound | Without ( | Dissipative minus ideal leak ( |
|---|---|---|---|
| Euler | |||
| MHD-GLM |
CPU and FNL (2 ranks) are identical to the printed digits except the round-off of the conserved runs, at most
Forests: the union must reproduce the single realm, fields within
| Forest | Bound | CPU | FNL |
|---|---|---|---|
mirror and refined, Euler and MHD-GLM | largest difference |
Related cases: the accuracy across the same seams is VV-8; the inviscid conservation across AMR seams is Euler AMR conservation; the forest machinery is multi-realm runs.
Findings
- The forest comparison is not bitwise, unlike MV-14's piecewise-constant states: each realm evaluates the sine from its own block origins, one ulp apart at step 0 (
). The largest difference after the run sits at the outer faces, not at the seam. - This leg found a library defect. A seam slab's edge and corner ghosts past a tangential boundary of the realm lie outside the peer domain, and were left to the boundary condition; along a periodic axis no condition fills them, and they kept their initial values. WENO never reads them, the dissipative tangential derivatives do: the mirror split went NaN at the first step (on a single realm of the same half domain the run is clean). The seam enumeration now wraps those ghost centres by one period when the axis is periodic on both realms (forest guide).