Skip to content

Clarify JOREK neighbour sentinels#392

Merged
krystophny merged 2 commits into
mainfrom
docs/jorek-neighbour-sentinels
Jul 13, 2026
Merged

Clarify JOREK neighbour sentinels#392
krystophny merged 2 commits into
mainfrom
docs/jorek-neighbour-sentinels

Conversation

@krystophny

Copy link
Copy Markdown
Member

Problem

The JOREK restart reader says -1 is the boundary marker for neighbours. Model-303 restarts can contain two nonpositive sentinels: -1 at collapsed-axis sides and 0 at physical-boundary sides. The reader already preserves both values, but its public contract and synthetic round-trip fixture cover only -1.

This PR documents the stored-value contract and adds 0 to the existing synthetic round trip. It changes no read path.

Numerical and interface invariants

  • Neighbor values remain unmodified after HDF5 input.
  • Array shape, Fortran indexing, restart validation, ABI, memory layout, and HDF5 schema are unchanged.
  • JOREK geometry, field evaluation, locator behavior, units, and boundary conditions are unchanged.
  • The fixture now proves that positive neighbors, zero physical-boundary sentinels, and negative collapsed-axis sentinels all round-trip.

Verification

Test fails on main

The documented nonpositive-sentinel contract and zero fixture are absent:

$ rg 'nonpositive boundary' src/field/jorek_restart.f90
exit=1

Test passes after fix

$ fo
Static: OK (227 modules, 227 changed, 227 affected)
Build: OK
Tests: OK
Lint: OK
All stages passed (.4s)

@krystophny krystophny merged commit 9be3b58 into main Jul 13, 2026
6 checks passed
@krystophny krystophny deleted the docs/jorek-neighbour-sentinels branch July 13, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant