Skip to content

feat: use real Cartesian Boozer chartmaps#327

Merged
krystophny merged 5 commits intofeature/boozer-chartmap-gvecfrom
feature/boozer-chartmap
Mar 28, 2026
Merged

feat: use real Cartesian Boozer chartmaps#327
krystophny merged 5 commits intofeature/boozer-chartmap-gvecfrom
feature/boozer-chartmap

Conversation

@krystophny
Copy link
Copy Markdown
Member

@krystophny krystophny commented Mar 26, 2026

Summary

Switch the Boozer chartmap export/import path to the real Cartesian embedding of the Boozer grid and tighten the end-to-end benchmark artifacts on top of the stacked SIMPLE work.

This top layer does two things:

  • replace the earlier pseudo-Cartesian Boozer export with the true physical Cartesian map
  • finalize the benchmark/golden artifacts around the cases that are actually trustworthy

Dependencies

SIMPLE stack

  • depends on SIMPLE PR 331

libneo dependency

The required libneo support is already merged on main.

That libneo change accepts zeta_convention='boozer', keeps the fast cyl and vmec paths unchanged, and routes the generalized Boozer case through the real Cartesian chartmap inversion path.

What changed in this top layer

  • export VMEC Boozer chartmaps with real Cartesian x,y,z
  • keep the GVEC converter on the same real-Cartesian contract
  • tighten the VMEC roundtrip field tolerance back to 1e-4 for QA, QH, and NCSX
  • keep the shared VMEC/GVEC benchmark on QA, where the downstream SIMPLE comparison is exact
  • keep QH and NCSX as strict VMEC-direct vs VMEC-chartmap end-to-end coverage
  • refresh the figure-8 golden chartmap and review plots for the real-Cartesian path
  • generate reviewer-facing artifacts under the CTest build tree, including multi-view 3D geometry sheets and combined loss plots

Final benchmark scope

Shared QA case

Compared across all three paths:

  1. direct VMEC Boozer
  2. VMEC-exported Boozer chartmap
  3. GVEC-exported Boozer chartmap

Observed on the current branch:

  • VMEC direct vs VMEC chartmap: max relative |B| = 7.20e-5, max |Δs| = 1.67e-9
  • VMEC direct vs GVEC chartmap: max relative |B| = 1.47e-4, max |Δs| = 5.50e-10
  • confined/lost fractions: exact match across all three runs

VMEC-only coverage

These remain strict direct-vs-file end-to-end checks:

  • QH: max relative |B| = 9.51e-5, max |Δs| = 6.97e-9
  • NCSX: max relative |B| = 9.79e-5, max |Δs| = 3.72e-7

Figure-8 GVEC golden case

  • QUASR boundary -> GVEC solve -> Boozer chartmap -> simple.x
  • golden signature refreshed to the real-Cartesian export
  • review artifact now shows the figure-8 geometry explicitly in x-z, y-z, and multiple 3D views

Verification

ctest --test-dir build --output-on-failure -R '^(test_e2e_boozer_chartmap|test_figure8_boozer_chartmap)$'

Result:

  • 100% tests passed, 0 tests failed out of 2
make test-fast

Result:

  • 100% tests passed, 0 tests failed out of 38

Review

Primary GVEC/QUASR review: @Rykath
SIMPLE-maintainer follow-up: @krystophny

@krystophny krystophny force-pushed the feature/boozer-chartmap branch from f56a72f to d0cf90f Compare March 27, 2026 10:23
krystophny added a commit that referenced this pull request Mar 27, 2026
## Summary

Remove all GVEC library dependencies and related code from SIMPLE. The
extended Boozer chartmap format (PR #327) replaces the need for GVEC
library linking — field data is now exchanged via NetCDF files.

## Removed

- 11 files deleted: field_gvec.f90, vmec_field_adapter.f90, 6 GVEC test
files, test data, license
- 13 files edited: removed all `#ifdef GVEC_AVAILABLE` blocks,
ENABLE_GVEC CMake option, FetchContent, map2disc dependency
- Zero GVEC references remain in src/, test/, CMake, or config files
(only DOC/ mentions preserved)

## Verification

- Build: 927/927 targets compile
- Tests: 38/38 Fortran tests pass
@krystophny krystophny force-pushed the feature/boozer-chartmap branch from 6fbfa85 to ffa67d6 Compare March 27, 2026 17:37
@krystophny krystophny force-pushed the feature/boozer-chartmap-gvec branch from 1de68f3 to 38115fc Compare March 28, 2026 13:13
@krystophny krystophny force-pushed the feature/boozer-chartmap branch from 69f1239 to d283f89 Compare March 28, 2026 13:13
@krystophny krystophny marked this pull request as ready for review March 28, 2026 13:18
@krystophny krystophny force-pushed the feature/boozer-chartmap branch from d283f89 to 35fcf84 Compare March 28, 2026 13:22
@krystophny krystophny force-pushed the feature/boozer-chartmap-gvec branch from 38115fc to da4c2e2 Compare March 28, 2026 13:22
@krystophny krystophny force-pushed the feature/boozer-chartmap branch from 35fcf84 to 4700801 Compare March 28, 2026 13:34
@krystophny krystophny force-pushed the feature/boozer-chartmap-gvec branch from da4c2e2 to 8a16303 Compare March 28, 2026 13:34
@krystophny krystophny merged commit f97010a into feature/boozer-chartmap-gvec Mar 28, 2026
@krystophny krystophny deleted the feature/boozer-chartmap branch March 28, 2026 14:59
@krystophny krystophny force-pushed the feature/boozer-chartmap branch from b47e7f8 to f97010a Compare March 28, 2026 14:59
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