Skip to content

Inter-realm 2:1 seam ​

CasesIssuesTypeBackendsFigureRegression
rmf-2realm-fd-pulse-refined#52CCPU, FNLno—

Case and scope ​

rmf-amr-fd-pulse (seam div(B)) split at its 2:1 face x=0 into two realms: a fine realm (x<0, built uniform one level finer, no marker) and a coarse realm (x>0), glued by coupling = refined. The union of the realms is the single-realm cell set. The inter-realm 2:1 seam reuses the intra-realm 2:1 formulas (coarse→fine ghost interpolation, the fine→coarse 2×2×2 mean, the 2:1 flux register), so the split must reproduce the single realm bit for bit, its #29 seam ∇⋅B source included: the same source, not a smaller or a larger one.

What the case catches:

  • any difference between the inter-realm and the intra-realm 2:1 seam operators;
  • a seam ∇⋅B monitor blind to inter-realm seams;
  • a collective ghost update that hangs or misbehaves on an empty rank: at 2 ranks one rank holds no block of one realm.

Models and numerics ​

ItemChoiceCode
EquationsMaxwell, SI, no sourcemodels
Spacecentred finite differences of order 6adam_fdv_operators_library.F90
TimeSSP Runge–Kutta (5,4), CFL 0.5, β cadenceadam_rk_object.F90
Seamcoupling = refined: the intra-realm 2:1 interpolation, restriction and register across the realm boundaryfill_seam_from_peer_forest, adam_prism_cpu_object.F90; adam_seam_exchange.F90; adam_seam_interpolation_library.F90
Monitor[IO] seam_divB_tol, warn-onlysave_divergence_history, adam_prism_common_object.F90; hazards

Initial and boundary conditions ​

ItemFine realmCoarse realmSingle realm (reference)
Extentx∈[−0.06,0]x∈[0,0.06][−0.06,0.06]3
Grid64 blocks of 8×16×16 (iu_ref_levels = 2), Δx=1.875⋅10−38 blocks of 8×16×16 (iu_ref_levels = 1), Δx=3.75⋅10−3rmf-amr-fd-pulse: x<0 refined by the box marker
Cells13107216384147456

Common: Gaussian pulse along +y, sigma = 0.01, B0 = 10; Neumann outer faces; 5 steps; 2 ranks (--np N), so every seam row crosses ranks. The script arms the monitor with seam_divB_tol = 1 in both realms.

Input files ​

FileRole
src/tests/prism/regression/rmf-2realm-fd-pulse-refined/input.ini, realm_{1,2}.inithe manifest and the realms
src/tests/prism/regression/rmf-amr-fd-pulse/input.inithe single-realm reference
src/tests/prism/regression/rmf-2realm-fd-pulse-refined/check.shruns both and compares (--build, --np N; PRISM_EXE)
src/tests/flume/verification/multirealm/multirealm_oracle.pythe union of the realms against the single realm, --tol 0
bash
cd src/tests/prism/regression/rmf-2realm-fd-pulse-refined && ./check.sh
PRISM_EXE=$PWD/../../../../../exe/adam_prism_fnl ./check.sh        # FNL

Results ​

LegAssertsBoundCPUFNL
healthboth runs reach 100 % with no error/abort/NaN—passpass
fieldsevery checkpoint field (B, D, J, div_*, res_*) of the union equals the single realm on every cellbitwise147456 cells, 27 fields147456 cells, 27 fields
divergence historiesat every step the single-realm max |∇⋅D| and max |∇⋅B| equal the larger of the two realms' maximaprinted digitspasspass
seam max |∇⋅B|, steps 1 → 5reported—6.86 → 12.656.86 → 12.65
monitorWARNING: seam div(B) ... exceeds [IO].seam_divB_tol in the split's logfires15 warnings15 warnings

Related pages: seam div(B) for the single-realm source; inter-realm 1:1 seams.

Findings ​

  • The split equals the single realm bit for bit on every field, on both backends: an inter-realm 2:1 seam is an intra-realm 2:1 seam across a realm boundary.
  • The split carries the single-realm seam source exactly. The coarse realm holds the maximum at steps 1–2, the fine realm at steps 3–5.
  • The seam ∇⋅B monitor covers inter-realm 2:1 seams.