Skip to content

Keep the asymmetric modes of a LASYM = T VMEC input - #34

Merged
krystophny merged 1 commit into
developfrom
fix/vmec-lasym-sincos
Nov 21, 2026
Merged

krystophny merged 1 commit into
developfrom
fix/vmec-lasym-sincos

Conversation

@krystophny

@krystophny krystophny commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

parameters_from_vmec chose the symmetric Fourier basis whenever the input had no RBS or ZBC coefficient, also with LASYM = T (params.py#L725-L740). A free-boundary run of an input with a symmetric initial boundary in an up-down asymmetric coil field then stayed up-down symmetric. For the DIII-D example the axis stayed at $Z = 0$, while VMEC2000 and VMEC++ give 3.9 mm.

LASYM = T now selects the _sincos_ basis for X1, X2 and LA (params.py).

test_parameters_from_vmec_lasym_with_symmetric_boundary fails without the change.

Chris&AI

parameters_from_vmec chose the symmetric basis whenever the input had no
RBS or ZBC coefficient, even with LASYM = T. A free-boundary run of the
DIII-D input (symmetric initial boundary, up-down asymmetric coils) then
stayed up-down symmetric: magnetic axis at Z = 0 instead of the 3.9 mm
that VMEC2000 and VMEC++ give. LASYM = T now selects the sin-cos basis.

Assisted-by: Claude Code:claude-opus-5-5
@krystophny

Copy link
Copy Markdown
Member Author

On e8df9e2 the pygvec test_util.py tests pass (36 passed). The new test fails on 1ca0c4b. The two errors in test_ev2vtk and test_read_write_parameters_ini are the same on both commits: their testfiles fixture needs a GVEC run output that was not present in this setup.

Chris&AI

@krystophny
krystophny added this pull request to the merge queue Nov 21, 2026
Merged via the queue into develop with commit 0295e3a Nov 21, 2026
7 checks passed
@krystophny
krystophny deleted the fix/vmec-lasym-sincos branch November 21, 2026 13:32
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