Skip to content

Export the global JOREK boundary-hole map#63

Open
krystophny wants to merge 1 commit into
test/jorek-global-plane-containmentfrom
test/jorek-global-hole-map
Open

Export the global JOREK boundary-hole map#63
krystophny wants to merge 1 commit into
test/jorek-global-plane-containmentfrom
test/jorek-global-hole-map

Conversation

@krystophny

Copy link
Copy Markdown
Member

Purpose

PR #62 proves that most source-element misses are covered elsewhere in the complete factor-8 plane. This PR exports the remaining global misses and classifies their JOREK adjacency.

CTest now writes one CSV row per unique poloidal hole with the source element, local coordinates, physical (R,Z), and four restart-neighbor values.

This PR is stacked on #62.

Adjacency convention

The retained restart uses both nonpositive sentinels:

  • -1 occurs on the 115 collapsed-axis elements;
  • 0 marks physical-boundary sides, with 183 occurrences across 179 elements.

The existing libneo comment says only -1 marks boundaries and is incomplete. This diagnostic treats every nonpositive neighbor as a boundary sentinel.

Result

The CSV has 74 data rows distributed across 59 consecutive elements, 5769:5827. Every hole element has neighbor_2=0 and no negative neighbor. There are no holes from elements whose four neighbors are positive.

Local point Rows
(s,t)=(5/6,1/6) 59
(s,t)=(0.9,0.1) 15

The physical locations trace one boundary strip over R=1.19554...2.13819 m and Z=-0.603215...0.793108 m. The 74 points are curved physical-boundary slivers excluded by the straight factor-8 chords, not interior topology holes.

The next plane-only diagnostic should run complete global containment at factor 16. That determines whether physical-boundary holes and overlap multiplicity contract before any boundary-node or volume-topology change.

Numerical and physics invariants

  • The global triangle locator, containment tolerance, field interpolation, exact samples, and restart adjacency are unchanged.
  • The CSV is observational and contains no toroidal duplicates.
  • Production mesh topology, field evaluation, orbit integration, CGS units, boundary conditions, and acceptance rules are unchanged.

Verification

Test fails on main

The parent diagnostic accepts no output path and produces no hole map:

$ test_jorek_global_plane_linearization.x "$GORILLA_JOREK_GOLDEN_RESTART" holes.csv
ERROR STOP restart path argument is required
exit=1

Test passes after fix

$ cmake -S . -B build-jorek -DGORILLA_ENABLE_JOREK=ON \
    -DGORILLA_JOREK_GOLDEN_RESTART="$GORILLA_JOREK_GOLDEN_RESTART"
$ cmake --build build-jorek -j$(nproc)
$ ctest --test-dir build-jorek --output-on-failure
100% tests passed, 0 tests failed out of 12
Total Test time (real) = 37.70 sec

$ test "$(wc -l < build-jorek/jorek_global_holes.csv)" -eq 75
global_hole_rows=75 PASS

$ fo
Static: OK (76 modules, 76 changed, 76 affected)
Build: OK
Tests: skipped, no affected tests
Lint: OK
All stages passed (.1s)

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