Appearance
Sensor-gated reflux prototype
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| B2 | Seam studies | M6 (#68) | NumPy prototype (no ADAM run) | yes | — |
Case and scope
B1 recovers order 5 only without the reflux, and A3 showed that a shock needs it. Phase E would apply the reflux only where a WENO sensor flags the face (reflux_policy = troubled); D-M6-4 builds it only if a prototype shows the order recovered with the shock positions intact. B2 is that go/no-go: does a sensor-gated reflux recover the smooth order, keep the shocks where the full reflux puts them, and how much conservation does it give up?
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Composite grid | the B1 grid: the box | Composite, proto2d.py |
| Space | WENO5-JS with Lax–Friedrichs splitting, the weights of adam_weno_object ( | weno5, weno_flux, proto2d.py; adam_weno_object.F90 |
| Time | classical RK4, | advance, proto2d.py |
| Reflux policies | always (today), never, troubled: a coarse box face takes the mean of its fine fluxes only where the sensor | Composite.rhs, proto2d.py |
| Arms | today's mean/cubic/always, and lag6/quintic under each policy | b2, proto2d.py |
| FLUME counterpart | reflux_policy = troubled (E2) | flag_troubled_seam_cells, adam_flume_cpu_object.F90 |
Initial and boundary conditions
| Leg | Law | Initial condition | Crossing | Final time |
|---|---|---|---|---|
smooth | the B1 advection, | — | ||
c2f | Burgers along | |||
f2c | Burgers along | |||
weak | Burgers along | a |
The rarefaction catches the shock on the way. The weak pulse's smoothness indicators sit near --long: 64 and 128).
Input files
| File | Role |
|---|---|
src/tests/flume/verification/amr-proto/proto2d.py | b2 [--cells ...] [--shock-cells ...] [--leg L ...] [--tau 0.2] [--check], L one of smooth, c2f, f2c, weak |
src/tests/flume/verification/amr-proto/check.sh | runs B1, B2 and B3 (--legs b2 for B2 alone) |
src/tests/flume/verification/make_doc_figures.py --only seam-proto-b2 | draws the figure (fig_seam_proto_b2; NumPy only, about 3 min) |
bash
cd src/tests/flume/verification/amr-proto && ./check.sh --legs b2 # B2: about 3 min
./check.sh --legs b2 --long # shock legs at N = 64 and 128, about 5 minMetrics against the exact solution: the mass defect over the pulse's own mass, and the mass-equivalent shock position of every row (the cells within --check): the smooth L1 and L∞ orders of troubled at least 4.7; on c2f and f2c, troubled within 0.05 cells of always and its mass defect at most never's is at least
Results

Left: the smooth leg, always is capped near order 3, troubled keeps the uniform order. Centre and right: the Burgers pulses at troubled places the strong shocks exactly where always does and keeps the mass defect below never misplaces the c2f shock by a cell and loses troubled equals never (the missed-detection control).
Smooth leg, orders of
| Arm | L1 | L∞ | L∞ corner / edge | Faces flagged |
|---|---|---|---|---|
| uniform | 5.01 | 4.95 | – | – |
| mean, cubic, always (today) | 3.03 | 2.22 | 2.22 / 2.05 | – |
| lag6, quintic, always | 2.96 | 2.10 | 2.10 / 1.96 | – |
| lag6, quintic, troubled | 5.01 | 4.95 | 5.10 / 5.02 | 0 % |
| lag6, quintic, never | 5.01 | 4.95 | 5.10 / 5.02 | – |
Shock legs (lag6/quintic; mean shock position in local cells, mass defect over the pulse's mass, the uniform control in brackets):
| Case, N | always | troubled | never | Faces flagged |
|---|---|---|---|---|
| c2f, 64 | −0.53, | −0.53, | −1.12, | 15 % |
| c2f, 128 (−0.30) | −0.50, | −0.50, | −1.07, | 8 % |
| f2c, 64 | −0.25, | −0.25, | +0.05, | 15 % |
| f2c, 128 (−0.37) | −0.25, | −0.25, | +0.06, | 7 % |
| weak, 64 (+0.02) | −0.003, | −0.014, | −0.014, | 0 % |
| weak, 128 (+0.01) | −0.015, | −0.022, | −0.022, | 0 % |
Related cases: B1 is the linear prototype; E2 measures the policy in FLUME; AL measured the sensor's false positives on the Euler vortex.
Findings
troubledrecovers the order. On the smooth leg the sensor flags no seam face, sotroubledisnever: order 5 in L1 and L∞, as the uniform control, against about 2 with the reflux always on.troubledkeeps the shock wherealwaysputs it. The two differ by at most 0.003 cells;nevermoves the shock by 0.3 to 0.6 cells and losesof the pulse's mass. The reflux at the flagged faces (7 to 15 % of the seam-face evaluations) is what holds the shock. troubledis near-conservative, not conservative. Its mass defect,to of the pulse, comes from the unflagged smooth faces (the rarefaction crossing the seam) and from the steps before the shock reaches the sensor's stencil; it is two to three orders below never's.- A missed detection is a small error here. The weak shock is never flagged, so
troubledruns asnever: its shock moves by 0.007 to 0.011 cells againstalwaysand it losesto of its own mass. What the JS sensor misses is what the reflux matters least for, but not nothing. - The corners are again not the L∞ cause. Under the nonlinear weights corner and edge maxima still converge at the same rate; A1's Euler L∞ order 1.46 is not reproduced by a scalar model, and stays open for the system (the characteristic projection).
- Verdict (D-M6-4): go for Phase E, with three conditions on record. The order is recovered only together with the high-order transfers of Phases C and D: with today's mean restriction the order stays at 2 whatever the reflux does (B1). The policy is near-conservative (
of the shocked mass), not exact. And A4 (AL) measured 5 % false positives on the Euler vortex with the sensor read on primitive variables, where this scalar model flags none; E must measure its own false-positive rate, since each flagged smooth face brings the order cap back.