Skip to content

Fix single-stage coil and surface optimization - #184

Open
rogeriojorge wants to merge 3 commits into
gftd/single_stagefrom
fix/single-stage-validation
Open

rogeriojorge wants to merge 3 commits into
gftd/single_stagefrom
fix/single-stage-validation

Conversation

@rogeriojorge

@rogeriojorge rogeriojorge commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Fix boundary-mode selection, the QS/iota objectives, and flux-matched VMEX export directly on gftd/single_stage at 67f26c4. No merge from main.

The original example keeps its structure and top-level globals, with no argument parser. Changes are limited to three physics modules, the example, focused regression tests, and two small initial-condition files. Loss infrastructure, ALM, dynamics, dependencies, workflows, and other examples are unchanged.

The active objective values and full gradients match the validated implementation exactly at the initial state and saved mode-1/2/3 states. All 64 targeted field, boundary, flux, objective, and derivative tests pass. Fresh-run and restart checks pass. Reloading mode 3 through the globals-only example runs VMEX successfully: edge iota 0.409839, aspect 3.63559, and nine diagnostic figures. The same saved state has independently checked equilibrium QS mean-square 4.53e-5 and coil RMS B·n/B 3.66e-4.

CI: Python 3.11 passes. Python 3.12 fails four unchanged Boozer-compaction tests on roundoff differences of 2.22e-16. Main's separate test-tolerance fix is excluded from this PR.

@gftd13 please review and test the boundary-mode globals, iota-fit safeguard, and VMEX export with your inputs. For continuation, edit RESTART_FROM, restart_filepath, output_filepath, and SURFACE_MPOL/NTOR. At mode 3 use QS_WEIGHT=1e4 and IOTA_MPOL=IOTA_NTOR=8.

@rogeriojorge
rogeriojorge requested a review from gftd13 October 23, 2026 23:40
@rogeriojorge
rogeriojorge marked this pull request as ready for review October 24, 2026 00:21
@rogeriojorge
rogeriojorge marked this pull request as draft October 24, 2026 03:57
@rogeriojorge
rogeriojorge force-pushed the fix/single-stage-validation branch from 65dafee to 015b504 Compare October 24, 2026 04:02
@rogeriojorge rogeriojorge changed the title Validate single-stage coil and boundary optimization Fix single-stage coil and surface optimization Oct 24, 2026
@rogeriojorge

Copy link
Copy Markdown
Member Author

@gftd13 I reduced this to the required fixes directly on your branch, with no main merge or argument parser. The example retains its globals and structure. Objective values and gradients match the validated results; the globals-only reload also reproduces the VMEX edge iota of 0.409839. Please review and test the boundary-mode controls, iota-fit safeguard, and VMEX export with your inputs.

@rogeriojorge
rogeriojorge marked this pull request as ready for review October 24, 2026 09:56
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