Repository navigation
GPEC - UPDATE - Merge upstream Fortran GPEC 1.6.1 - #13
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
field_bs_psi and field_bs_rzphi evaluated the Biot-Savart integrand of each polyline segment once, at its midpoint (dl x r/|r|^3). The error is of order (L/d)^2 for a segment of length L seen from distance d, so coils with long straight sides gave fields that were wrong by about 10 % on nearby surfaces. Each segment now contributes its closed-form field (Hanson and Hirshman, Phys. Plasmas 9, 4410 (2002)), which is exact for the polygon in the coil file. In field_bs_rzphi the former distance floor dlmin becomes the radius of a regularizing wire. regression/test/coil_segment_field.f90 checks the segment field against the textbook closed form and that field_bs_rzphi does not depend on how the straight sides of a rectangular coil are split.
…egment-biot-savart COIL - FEATURE - Use the exact field of each straight coil segment
xigradpsi, xigradpsi_dpsi and xigradalpha are xi.grad(psi_N) and xi.grad(alpha) normalized by chi1, so they are dimensionless, not m. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
…type bwpmns_rmatch was only set in the branch that reuses the working coordinates (jac_out == jac_type and tmag_out /= 0), so other runs wrote uninitialized memory to Jbgradpsi_rmatch. Convert the RMATCH solution to output coordinates the same way as Jbgradpsi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
…notes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
…otfix-1.6.1 GPEC v1.6.1 hotfix: netcdf units and Jbgradpsi_rmatch
…aster hotfix v1.6.1
krystophny
marked this pull request as draft
November 27, 2026 01:49
krystophny
marked this pull request as ready for review
November 27, 2026 01:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge PrincetonUniversity/GPEC develop at 86a1d8f into the production fork. The merge brings in 1.6.1 and preserves the history used by pinned runs. Upstream now includes the straight-coil segment fix we already carry. The fork's direct-coordinate radius projection and its restoration of the coordinates used by later profile diagnostics remain in place.
The native GNU Fortran build and both tests in
test_direct_error_message.pyandtest_direct_projected_radius.pypassed. The merge changes three files against the fork tip. It includes the upstream fix for the matching-surface Jacobian when the output coordinate choice,jac_out, differs fromjac_type.Chris&AI