Appearance
2:1 seam div(B): truncation order
| Cases | Issues | Type | Backends | Figure | Regression |
|---|---|---|---|---|---|
rmf-amr-fd, rmf-amr-fd-pulse | #21, #22, #25, #26, #29 (#99 open) | P | CPU, FNL | no | rmf-amr-fd, rmf-amr-fd-pulse (digest + residuals, CPU and FNL) |
Case and scope
On a uniform grid
The two cases pin that state. The historical pointwise criterion "seam div(B) ≤ 1e-13" is retired (#21). The acceptance is now:
- the identity holds wherever there is no resolution jump (marker-off control, and a grid refined uniformly so that every block face is 1:1);
- the seam
sits on a pinned baseline, within 5 %: a rise is a regression of the seam fill or the exchange, a drop is an improvement to rebaseline deliberately; - the seam source converges under refinement (opt-in leg).
rmf-amr-fd carries the four coils. Its coil filament makes rmf-amr-fd-pulse is the source-free twin: with
What the cases catch:
- a seam fill or a ghost exchange that changes the seam source (baseline legs);
- a 1:1 block face that leaks (the uniform-refined leg isolates the jump as the only source);
- a ghost fill that no longer reproduces constants:
of the pulse is structurally zero across the seam; - an untruthful
diagnostic (#26: unstamped J ghosts and a stamp lagged by one step put it six orders off); - an RK scheme the staged forest path cannot split, running instead of refusing (#25).
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | Maxwell, SI; 4 AC coils (rmf-amr-fd) or no source (rmf-amr-fd-pulse) | models |
| Space | centred finite differences of order 6 | compute_curl_fd_centered, compute_divergence_fd_centered, adam_fdv_operators_library.F90 |
| Time | SSP Runge–Kutta (5,4), CFL 0.5; SSP (1,1) and runge-kutta-1 in the RK legs | adam_rk_object.F90 |
| Seam ghosts | coarse→fine tricubic interpolation over the full ghost slab ([amr] seam_ghost_fill, default tricubic), fine→coarse restriction | seam_interpolate_tricubic, adam_seam_interpolation_library.F90; adam_field_object.F90 |
| RK contract | the staged forest path accepts SSP schemes only | stages_per_step_forest, adam_prism_cpu_object.F90 |
| Diagnostic | max -divergence_history.dat | save_divergence_history, adam_prism_common_object.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Domain | |
| Grid | octree, 8 blocks of ngc = 3 |
| Initial condition | rmf-amr-fd: vacuum with 4 AC coils. rmf-amr-fd-pulse: Gaussian pulse along r0 = 0, sigma = 0.01, k0 = 0, B0 = 10 ( |
| Boundaries | Neumann on all six faces (the pulse moves |
| Steps, ranks | 5, 1 rank |
| Control | markers_number = 0 (no seam) |
| Uniform leg | box_xmax = 0.06: the whole domain at level 2, every face 1:1 |
| Convergence leg | ni = 16, 5 steps against ni = 32, 10 steps: the same final time |
Input files
| File | Role |
|---|---|
src/tests/prism/regression/rmf-amr-fd/input.ini, check.sh | the coil case: control, seam |
src/tests/prism/regression/rmf-amr-fd-pulse/input.ini, check.sh | the pulse: control, uniform, seam, RK legs, quadtree leg (quadtree), --convergence |
bash
cd src/tests/prism/regression/rmf-amr-fd && ./check.sh
cd ../rmf-amr-fd-pulse && ./check.sh --convergence
PRISM_EXE=$PWD/../../../../../exe/adam_prism_fnl ./check.sh # FNLResults
Bounds as coded; the baselines are CPU-pinned and the 5 % band is the cross-backend and cross-compiler allowance.
| Case, leg | Asserts | Bound | CPU | FNL |
|---|---|---|---|---|
rmf-amr-fd, control | max | |||
rmf-amr-fd, seam | max | |||
rmf-amr-fd, seam | max | |||
| pulse, control | max | 0, 0 | 0, 0 | |
| pulse, uniform level 2 (1:1 faces) | max | 0, 0 | 0, 0 | |
| pulse, seam | max | |||
| pulse, seam | max | 12.65004 | 12.65004 | |
pulse, runge-kutta-1 | non-zero exit with not stage-splittable in the log | refusal | refused, exit 1 | refused, exit 1 |
| pulse, SSP (1,1) | max | |||
pulse, --convergence |
Long-horizon measurement, not a leg: on the pulse at fixed ni = 64, is 1.62, toward the predicted 2.
Related pages: quadtree runs the same seam on a quadtree; inter-realm 2:1 seam reproduces the seam source across a realm boundary; absorbing layers on AMR and the [IO] seam_divB_tol monitor are the guard-rails.
Findings
- The jump is the only source: on the uniformly refined grid, with the same resolution, the same block count and the same ghost exchange, both divergences stay at round-off.
of the pulse stays at round-off across the seam: it is with no variation, and every partition-of-unity ghost fill preserves it. - The seam source converges under refinement (
on the first rung, 1.62 on the second) and grows without bound in time at fixed . It is a constraint violation, not an energy instability. - The
band is a factor 3, not 5 %: of the coil filament cancels gradients of order down to , and the cross-compiler noise of the coil geometry ( relative on ) leaves a absolute floor. - A low-storage RK scheme on the seam case stops with the contract message; before #25 it crashed.