Appearance
Quadtree 2:1 seams
| Cases | Issues | Type | Backends | Figure | Regression |
|---|---|---|---|---|---|
rmf-amr-fd-pulse, quadtree leg | #46 | C | CPU, FNL | yes | — |
Case and scope
A quadtree ([amr] ratio = 4) refines
The leg runs the source-free pulse of seam div(B) on the octree of the regression case and on a quadtree, and compares them column by column. The pulse is uniform in
What the case catches: a seam operator that mixes cells of different
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | Maxwell, SI, no source | models |
| Space | centred finite differences of order 6 | adam_fdv_operators_library.F90 |
| Time | SSP Runge–Kutta (5,4), CFL 0.5; | numerics |
| Seam ghosts | fine→coarse restriction (mean of 8 fine cells on an octree, 4 on a quadtree), coarse→fine tricubic fill | seam_interpolate_tricubic, adam_seam_interpolation_library.F90; adam_field_object.F90 |
| Reflux | fine face flux restricted per axis | restrict_fine_face_to_quadrant, adam_flux_register_object.F90 |
Initial and boundary conditions
| Item | Octree (reference) | Quadtree |
|---|---|---|
| Domain | the same | |
| Tree | ratio = 8 | ratio = 4 |
| Grid | 8 blocks of | one nk = 16: |
| 2:1 seam | ||
| Initial condition | Gaussian pulse along sigma = 0.01, B0 = 10 | the same |
| Boundaries | Neumann | the same |
| Steps, ranks | 5, 1 | 5, 1 |
Input files
| File | Role |
|---|---|
src/tests/prism/regression/rmf-amr-fd-pulse/input.ini | the octree case; the leg rewrites ratio for the quadtree |
src/tests/prism/regression/rmf-amr-fd-pulse/check.sh | the quadtree leg is default-on; --keep keeps its checkpoints |
src/tests/flume/verification/mhd/quadtree/quadtree_oracle.py | shared with FLUME's MV-15: keys the cells by their |
src/tests/prism/regression/make_doc_figures.py | draws the figure from the --keep work directories |
bash
cd src/tests/prism/regression/rmf-amr-fd-pulse && ./check.sh --keep # CPU
PRISM_EXE=$PWD/../../../../../exe/adam_prism_fnl ./check.sh # FNLThe oracle asserts, per field:
- the
spread of every column of each run at most ; - the quadtree against the octree at the same
at most ; - the quadtree's max
at most .
Each field is measured against the largest magnitude of its vector (
Results

Top row:
| Check | Bound | Octree | Quadtree |
|---|---|---|---|
| 0 | |||
| against the octree, per | — | ||
| seam max | reported | 12.65004 | 12.65004 |
| max | 0 |
CPU values; FNL in parentheses where it differs.
Related pages: FLUME's quadtree AMR (MV-15) runs the same oracle on ideal MHD.
Findings
- The quadtree reproduces the octree to round-off, including the seam's
source to every printed digit. On a -invariant field the per-axis seam formulas (restriction over fine cells, coincident interpolation rows along ) give the same values as the octree's ones on two identical layers. - The octree's own
spread and its non-zero are round-off of its interpolation: its tricubic weights depend on the sub-position. The quadtree has neither.