Appearance
Field loop advection
| ID | Group | Milestone | Type | Backends | Figure | Regression |
|---|---|---|---|---|---|---|
| MV-9 | Ideal MHD | M2 (#41) · P6c; #79 (follow-up) · --agree | P | CPU, FNL | yes | field-loop |
Case and scope
A weak magnetic loop,
so the generated
What the case catches:
- a divergence error above the GLM level:
under a bound and decreasing under refinement; - excess dissipation:
above a bound; - a seam div(B) source that does not decay (
--amr): the seam div(B) must fall from its peak; - backend disagreement on
( --agree): the CPU and FNL runs compared field by field.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD, | models |
| Space | WENO5 flux splitting on characteristic variables; weno-riemann under --numerics | mhd_glm_face_split_fluxes, mhd_eigenvectors_core, adam_flume_mhd_library.F90; numerics |
| Divergence control | GLM, glm_ch_check = error), glm_alpha = 0.18, glm_damping_length = 1.0 | models |
| Time | SSP Runge–Kutta, 5 stages (runge-kutta-ssp-54), CFL 0.4 | adam_stepper_object.F90 (SELAH) |
AMR (--amr) | primitive-box marker at initialisation; 2:1 restriction, tricubic ghost fill, reflux; seam div(B) column of the history | interp_seam_ghost, adam_field_object.F90; compute_divb_history, adam_flume_cpu_object.F90 |
| Boundaries | periodic | boundary conditions |
| FNL backend | the same kernels on the device | adam_flume_fnl_object.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Domain | |
| Grid | the vortex grid of V2 (quadtree, |
Grid, --amr | ladder nk = 1, make_field_loop.py --ratio 8 gives the octree with null nk = 4 of M2-P7b) |
| Ranks | 2 |
| Initial condition | field-loop: |
| Boundaries | periodic on |
| Final time | --amr |
Input files
| File | Role |
|---|---|
src/tests/flume/verification/mhd/field-loop/make_field_loop.py | writes the input from vortex/vortex-n064.ini (--cells, --time-max, --glm-ch, --vz, --refine-box) |
src/tests/flume/verification/mhd/field-loop/check.sh | runs the ladder (--amr, --agree, --numerics SPEC, --legs mv9) |
src/tests/flume/verification/mhd/field-loop/field_loop_oracle.py | |
src/tests/flume/verification/mhd/seam_divb_oracle.py | the seam div(B) decay (--amr) |
src/tests/flume/verification/make_doc_figures.py fig_field_loop | draws field-loop.png from <runs>/field-loop (--only field-loop) |
bash
cd src/tests/flume/verification/mhd
field-loop/check.sh # CPU (about 10 min)
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl field-loop/check.sh # FNL
field-loop/check.sh --agree # CPU against FNL, after both runs
field-loop/check.sh --amr # 2:1 seams (about 28 min)make_doc_runs.sh <runs> mhd writes the figure run (<runs>/field-loop: make_doc_figures.py --runs <runs> draws it.
Results

Magnetic pressure
| Check | Bound | CPU | FNL |
|---|---|---|---|
| the same | |||
| its rate under refinement | 0.79 (0.20 from 128 to 256) | 0.79 | |
| 0.872 / 0.937 | the same | ||
--amr: | the same | ||
--amr: | 0.80074 / 0.90068 | the same | |
--amr: final seam div(B) / its peak | 0.1 | 0.022 / 0.011 | the same |
--agree: CPU against FNL at the final time, largest relative difference, | — | ||
--amr --agree, | — |
Measured: ADAM 0bcdf870 + the night-2026-11-22 tree (the paper commit, tag pending), CPU gfortran 16.2.0 + Open MPI 5.0.11 (iac_gnu) on medooza (gnode22), FNL nvfortran 26.9, CUDA 12.9 (iac_nvf) on NVIDIA A30, 2026-11-23 (field-loop/check.sh, --amr, then --agree and --amr --agree on the last checkpoints of both, jobs 1369376 CPU, 1369378 FNL, 1369379 agree): every row; the --amr values the same as the first measurement below.
The --amr rows: quadtree, nk = 1, 0bcdf870, CPU gfortran 16.2.0 + Open MPI 5.0.11 and FNL nvfortran 26.9 on an A30, 2026-11-22 (Slurm job 1369320): CPU and FNL agree to the printed digits. The bounds are these values plus 2 % (
Related cases: glm cleaning measures the GLM transport and damping on an exact solution; runtime regrids and accuracy of runtime AMR track this loop with a moving refinement (regression field-loop-regrid); the M6 seam studies G3a and G3b run it across a 2:1 seam under GLM and EGLM.
Findings
- The loop field jumps at
, so the discrete div(B) there is over a ring wide: the source is in and the decrease is slow. No convergence order is expected; the measured level matches the GLM level of Mignone & Tzeferacos ( ). - On AMR the refined half dissipates less (
0.802, 0.901 against 0.759, 0.884 uniform); the seams add at and none at . The seam div(B) peaks at the first step (the initial-data error of the loop edge) and GLM removes it; the collocated PRISM seam runs away instead (#29). - The backends agree to round-off on
as on the fluid. Until #79 they differed by on : the slow-wave normalisation of the eigenvectors cancelled catastrophically; it is now cancellation-free (numerics).