Skip to content

GPEC - UPDATE - Merge upstream Fortran GPEC 1.6.1 - #13

Merged
krystophny merged 9 commits into
developfrom
sync/upstream-develop-20261127
Nov 27, 2026
Merged

krystophny merged 9 commits into
developfrom
sync/upstream-develop-20261127

Conversation

@krystophny

Copy link
Copy Markdown
Member

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.py and test_direct_projected_radius.py passed. 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 from jac_type.

Chris&AI

logan-nc and others added 9 commits October 24, 2026 16:42
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
…otfix-1.6.1

GPEC v1.6.1 hotfix: netcdf units and Jbgradpsi_rmatch
@krystophny
krystophny added this pull request to the merge queue Nov 27, 2026
@krystophny
krystophny marked this pull request as draft November 27, 2026 01:49
@krystophny
krystophny removed this pull request from the merge queue due to a manual request Nov 27, 2026
@krystophny
krystophny marked this pull request as ready for review November 27, 2026 01:52
@krystophny
krystophny added this pull request to the merge queue Nov 27, 2026
Merged via the queue into develop with commit 92564f2 Nov 27, 2026
6 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.

3 participants