Skip to content

Read the legacy RAXIS and ZAXIS and scalar axis entries of VMEC inputs - #30

Merged
krystophny merged 1 commit into
developfrom
fix/vmec-legacy-axis
Nov 7, 2026
Merged

krystophny merged 1 commit into
developfrom
fix/vmec-legacy-axis

Conversation

@krystophny

Copy link
Copy Markdown
Member

parameters_from_vmec knew only RAXIS_CC, RAXIS_CS, ZAXIS_CC and ZAXIS_CS and skipped scalar values. Decks that set RAXIS = ... / ZAXIS = ... (most STELLOPT and educational_VMEC decks) or a single RAXIS_CC = 1.5 therefore lost their axis and fell back to init_average_axis. On bean-shaped stellarators that initial guess fails with JACOBIAN WITH SIGN CHANGE FOUND AFTER INITIALIZATION.

VMEC copies the nonzero entries of RAXIS and ZAXIS into RAXIS_CC and ZAXIS_CS (vmec_input.f, read_indata_namelist). The reader now does the same and accepts scalars.

  • On 57 benchmark decks that failed this way, GVEC's initial interpolation now has a positive Jacobian for 38 (evaluated from the converted parameters). Three of them (NCSX, W7-X, li383) run through initialisation in GVEC.
  • New test test_parameters_from_vmec_reads_legacy_and_scalar_axis fails on develop and passes with the change.

Chris&AI

parameters_from_vmec knew only RAXIS_CC and the other modern names and skipped scalar values, so decks with RAXIS = ... or RAXIS_CC = 1.5 lost their axis and fell back to init_average_axis, whose initial Jacobian changes sign on bean-shaped stellarators. VMEC copies nonzero RAXIS and ZAXIS entries into RAXIS_CC and ZAXIS_CS; do the same.
@krystophny
krystophny added this pull request to the merge queue Nov 7, 2026
Merged via the queue into develop with commit 60c910c Nov 7, 2026
7 checks passed
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