Skip to content

Inter-realm seams between misaligned blocks ​

CasesIssuesTypeBackendsFigureRegression
rmf-2realm-fv-pulse-blocks#51, #54CCPU, FNLno—

Case and scope ​

The 1:1 mirror pulse of inter-realm 1:1 seams, on the finite-volume path, with the seam blocks of the two realms not lined up: one realm carries the same cells in smaller blocks, or in a single block. Each block face of the fine side (realm 2, realm_b) is scattered into every register face it overlaps. On a mirror seam the fluxes of the two sides are equal, so every register face must close: the printed mismatch max|Fcoarse−∑Ffine| must be exactly 0.

What the case catches:

  • a fine face scattered into the wrong register face, or into too few (#51);
  • a seam-peer lookup that fails when one realm is a single block: the lookup then walks up from a level-1 code to the root, and aborted with error −111 before #54.

Models and numerics ​

ItemChoiceCode
EquationsMaxwell, SI, no sourcemodels
Spacecentred finite volumes of order 6 (fv_centered)numerics
TimeSSP Runge–Kutta (5,4), CFL 0.5, β cadenceadam_rk_object.F90
Registerfine skins scattered over the overlapping register faces (maps%seam_overlap)accumulate_fine_overlaps, adam_flux_register_object.F90; adam_maps_object.F90
Peer lookupclosest block of the peer tree (get_closest_block)adam_tree_object.F90

Initial and boundary conditions ​

ItemValue
Realmsx∈[−0.06,0] and [0,0.06], y,z∈[−0.06,0.06] m, mirror seam at x=0, β cadence
Default realm grid8 blocks of 8×16×16, Δx=3.75⋅10−3
small1, small2realm 1 (resp. 2) on 64 blocks of 4×8×8 (iu_ref_levels = 2): the same cells
one1, one2realm 1 (resp. 2) on one block of 16×32×32 (iu_ref_levels = 0, max_level kept 1)
Referencethe single-realm FV pulse: rmf-amr-fd-pulse on fv_centered, marker off, 8 blocks of 163
Initial conditionGaussian pulse along +y, sigma = 0.01, B0 = 10
BoundariesNeumann on the outer faces
Steps, ranks20, 2

Input files ​

FileRole
src/tests/prism/regression/rmf-2realm-fv-pulse-blocks/input.ini, realm_{1,2}.inithe manifest and the realms
src/tests/prism/regression/rmf-2realm-fv-pulse-blocks/check.shbuilds the reference and the four legs (--build, --np N; PRISM_EXE)
src/tests/flume/verification/multirealm/multirealm_oracle.pythe union of the realms against the single realm, cell by cell
bash
cd src/tests/prism/regression/rmf-2realm-fv-pulse-blocks && ./check.sh
PRISM_EXE=$PWD/../../../../../exe/adam_prism_fnl ./check.sh        # FNL

Results ​

Each leg asserts: the run reaches 100 % with no error/abort/NaN; the reflux line is printed and its maximum is exactly 0; the union of the realms matches the single-realm FV pulse within 10−13 (relative).

LegRegister lines (face × step)max mismatchFields against the single realmBackends
small1 (register side on small blocks: each register face holds 2×2 realm-2 faces)3200≤4.3⋅10−15CPU, FNL
small2 (each realm-2 face scattered into 4 register faces)800≤4.3⋅10−15CPU, FNL
one1200≤4.9⋅10−15CPU, FNL
one2800≤4.9⋅10−15CPU, FNL

Related pages: inter-realm 1:1 seams on aligned blocks; static AMR for the register on intra-realm 2:1 faces.

Findings ​

  • The register closes exactly on every face and step, whichever side carries the small blocks.
  • The fields are compared within 10−13, not bitwise: PRISM FV is not invariant under a change of block layout at round-off. The single realm alone on 4 blocks per axis instead of 2 differs by 6.6⋅10−16. The register check is the exact one.
  • A realm made of one block runs: the peer lookup reaches the root without aborting.