Repository navigation
ForceFreeStates - BUGFIX! - Force the reduction at kinetic singular crossings in the previous pivot order - #626
Merged
Merged
Conversation
…rossings in the previous pivot order Match Fortran GPEC 1.6.0: a call at a singular surface always reduces, even right after another reduction, and then keeps that reduction's pivot order. Before, a kinetic crossing reached just after a reduction only reset the reference norms and skipped the forced reduction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdRsGGg4YRG6E9fgLGbpdF
…uction reduces in that reduction's pivot order Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdRsGGg4YRG6E9fgLGbpdF
…urface is left to truncate at With truncate_at_rational_offset on and no rational surface of n far enough below qlim, the stepped-back qlim fell below q_min and the psilim root find failed without saying why. Fortran GPEC stops at the same point. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdRsGGg4YRG6E9fgLGbpdF
…on path, not only the rational offset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdRsGGg4YRG6E9fgLGbpdF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdRsGGg4YRG6E9fgLGbpdF
This was referenced Nov 2, 2026
matt-pharr
approved these changes
Nov 2, 2026
matt-pharr
left a comment
Collaborator
There was a problem hiding this comment.
Thankfully, not all of these were even a problem in julia in the first place thanks to @jhalpern30's fantastic work dealing with the ODE integrator... However, I am confident that this is a faithful port of the mentioned fixes that went into fortran v1.6.0.
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.
Release note
gal_resistive_peis N/A by design.sing_flagand resets the reference norms, which can shift later renormalizations, so results move at most at round-off. Aqlimbelow q_min, fromqhighor fromtruncate_at_rational_offset, now stops with an error that names the cause instead of a failed root find.These are the ForceFreeStates items of #591, the Fortran GPEC 1.6.0 corrections:
truncate_at_rational_offseton and no rational surface left to truncate at, the run stops with a clear error instead of a failed root find (Julia-only check; Fortran PR 323's empty-surface fixes need no port, see the probes).What changed
93255e19a1f8abc54compute_solution_norms!: the early returnodet.new && !at_ideal_crossingreset the reference norms and skipped the reduction thatsing_flagshould force. A kinetic crossing, which passes no resonant rows, reached right after a reduction never reduced. Nowfix_required = sing_flagas in Fortran. When the call comes right after a reduction,unormis first rebuilt from that reduction'sodet.index, so the repeated reduction pivots in the same order. Before, it used raw norms.b89935112new = truereduces (ifixadvances,sing_flagrecorded) in the previous pivot order[3, 1, 2], not the raw-norm order[1, 2, 3].4be641761sing_lim!errors when steppingqlimback to keeprational_offset_fractionlands below q_min. Fortransing_limhas no such check: its Newton search on the extrapolated spline can return ψ_lim < 0 instead of stopping with "Can't find psilim".29bdbaae3truncate_at_rational_offset = falsewithqhighbelow q_min. The message no longer suggests raisingqhigh, which does nothing whenqmaxor the layer-overlap cap is what binds. The test no longer depends on where q_min falls.b181766f9Probes (temporary logging, not committed):
qhigh = 1.95) completes withtruncate_at_rational_offset = false, so the empty surface list that Fortran PR 323 guarded is already safe in Julia: every next-surface search inchunk_el_integration_boundstestsising <= msing(kmsing) before indexing. With truncation on, the run used to die inRoots.ConvergenceFailed.Regression report
The baseline is #356's sweep, which develop now contains (
5503af4fa); that sweep is itself bit-identical to develop (#356's report). The head2515fca8fonly adds that develop merge on top of618e48dff, with nosrcchanges.Notes for reviewers
develop, merged up to5503af4fa.sing_flagrecord (soidcon.fnever zeroed the resonant column) or, in the intermediate87e6ad16, re-sorted on raw norms and replaced the wrongindex(1)column, moving W_t by ~2%. Julia's ideal crossing always reduced and recordszeroed_idx, and it picks the replaced columns by their resonant rows, not byindex(1). Its kinetic crossing is thecon_flag = trueport, which uses neither. This PR is Fortran parity in control flow, consistent with the unchanged harness.ifix == 0) uses raw norms. Fortran would use the axis-initialization order, but Julia keeps no such slot.runtests_eulerlagrange137/137 (plus 26, 38 and 2 in its other top-level sets),runtests_layer_overlap_fitzpatrick81/81 (9 + 43 + 29),runtests_sing90/90,runtests_solve_api173/173.29bdbaae3.🤖 Generated with Claude Code
https://claude.ai/code/session_01VdRsGGg4YRG6E9fgLGbpdF