P4 Conservation
| ID | Group | Type | Backends | Figure | Program |
|---|---|---|---|---|---|
| P4 | Properties | P | CPU (gfortran, nvfortran, ifx); GPU (A30, tests-nvf-oac) | yes | selah_test_stepper |
Case and scope
A conservative finite-volume solver changes the mass only through its boundary fluxes. With a Runge–Kutta step, the step's flux is the weighted sum of the stage fluxes:
An AMR flux register accumulates exactly this sum at coarse–fine faces, using stage_weight(k). The case checks the identity in every Runge–Kutta form. That includes the low-storage ones, whose coefficients are not stage_weight is derived from the Butcher form. As a control it repeats the sum with uniform weights
Setup
| Item | Value |
|---|---|
| Problem | |
| Grid | 4 blocks of 16 cells, central flux form; FUNDAL arrays |
| Steps | 4, every scheme in every form (Butcher, two-register, 2N, Ketcheson) |
| Bound | $ |
| Control | the same with |
Program
./exe/selah_test_stepper
SELAH_VV_DIR=exe/vv-data ./exe/selah_test_stepper # telescoping.datResults

The conservation defect with stage_weight (coloured) and with uniform weights (grey), largest over 4 steps.
| Scheme | Form | Defect with stage_weight | Defect with uniform weights |
|---|---|---|---|
euler | Butcher | 5.27e-16 | 5.27e-16 |
euler | two-register | 5.27e-16 | 5.27e-16 |
ssp-22 | Butcher | 3.33e-16 | 3.33e-16 |
ssp-22 | two-register | 3.33e-16 | 3.33e-16 |
ssp-33 | Butcher | 2.01e-16 | 0.03501 |
ssp-33 | two-register | 6.24e-16 | 0.03501 |
ssp-54 | Butcher | 2.67e-16 | 5.21e-04 |
ssp-104 | Butcher | 6.00e-16 | 6.00e-16 |
ssp-104 | Ketcheson | 5.83e-16 | 5.83e-16 |
rk4 | Butcher | 5.03e-16 | 0.008229 |
lsrk-33 | Butcher | 5.48e-16 | 0.009265 |
lsrk-33 | Williamson 2N | 3.19e-16 | 0.009265 |
lsrk-54 | Butcher | 5.86e-16 | 0.001091 |
lsrk-54 | Williamson 2N | 6.63e-16 | 0.001091 |
Largest over 4 steps of inflow/outflow advection. The weights of euler, ssp-22 and ssp-104 (Ketcheson's
Findings
- The identity holds to round-off in every form of every scheme.
- Uniform weights miss by up to
(ssp-33): a refluxed AMR solver with the wrong weights silently stops conserving. For euler, ssp-22 and ssp-104 the weights are uniform, and both columns agree. - The tutorial and the AMR cookbook show the register in use, and a correction at a face with mismatched fluxes restoring conservation to
.