Skip to content

Use libneo field abstraction and boozer_sub; drop SIMPLE copies#389

Draft
krystophny wants to merge 1 commit into
feat/vmec-axis-power-law-namelistfrom
cutover/use-libneo-boozer-converter
Draft

Use libneo field abstraction and boozer_sub; drop SIMPLE copies#389
krystophny wants to merge 1 commit into
feat/vmec-axis-power-law-namelistfrom
cutover/use-libneo-boozer-converter

Conversation

@krystophny

Copy link
Copy Markdown
Member

Summary

Cut SIMPLE over to libneo as the single source for the Boozer converter and its field abstraction. Deletes the five files now owned by libneo and resolves the identically-named modules from the linked libneo neo library. This is the SIMPLE half of the converter consolidation (itpplasma/libneo#305); rabe's half is itpplasma/rabe#100.

Changes

git rm (−2027 lines) and drop from src/CMakeLists.txt:

  • src/boozer_converter.F90 -> libneo boozer_sub
  • src/field/boozer_chartmap_io.f90 -> libneo boozer_chartmap_io
  • src/field/field_base.f90 (magnetic_field_t) -> libneo field_base
  • src/field/field_vmec.f90 (vmec_field_t) -> libneo field_vmec
  • src/field/vmec_field_eval.f90 -> libneo vmec_field_eval

SIMPLE's call sites and use statements are unchanged: libneo exports the same module/type/procedure names. The remaining SIMPLE field subclasses (field_coils, field_splined, field_boozer_chartmap, field_newton) and field.F90/field_clone stay in SIMPLE and extend libneo's magnetic_field_t.

Dependency / merge order

Requires libneo with: the converter boozer_sub (itpplasma/libneo#310), its dual-compatible API — optional vmec_file and optional trailing sqrt_g_ss_B (#315) — the angle transforms (#311) and chartmap spoke (#312), and the axis_healing_power_law/rho_axis_heal symbols in new_vmec_stuff_mod (#306, which SIMPLE's config namelist imports). Built and validated against libneo feat/boozer-field-single-source (which integrates #310-#312, #315, and #306). Re-pin to a libneo main commit once those land.

Verification

Built CPU (gfortran) against the local libneo branch (-DLIBNEO_SOURCE_DIR=...), 372/372 targets clean. Boozer test suite:

$ ctest -R "golden_record_boozer|boozer_chartmap|boozer" --output-on-failure
test_boozer_chartmap ................. Passed
test_boozer_chartmap_roundtrip ....... Passed   (14.52s)
test_boozer_chartmap_gvec_qa ......... Passed   (105.42s)
test_e2e_boozer_chartmap ............. Passed   (62.99s)
golden_record_boozer ................. Passed   (125.73s)   <- full VMEC->Boozer->orbit, rtol 1.5e-7
golden_record_boozer_ncsx ............ Passed   (53.90s)
test_boozer_spline_derivatives ....... Passed
8/8 passed, 0 failed

golden_record_boozer (the acceptance pin: confined_fraction/times_lost vs frozen golden at rtol 1.5e-7) passes against the libneo-provided converter, confirming the cutover is behavior-preserving. (booz_xform/map2disc Python chartmap tests skip: optional packages not installed in this environment.)

Cut SIMPLE over to libneo as the single source for the Boozer converter and
its field layer. Delete the five files now owned by libneo (field_base,
field_vmec, vmec_field_eval, boozer_converter, boozer_chartmap_io) and drop
them from src/CMakeLists.txt; the identically-named libneo modules resolve in
their place. SIMPLE call sites and use statements are unchanged.

Requires libneo with the dual-compatible boozer_sub API (optional vmec_file,
optional trailing sqrt_g_ss_B) and the axis_healing_power_law/rho_axis_heal
symbols in new_vmec_stuff_mod.
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