Fix collision precompute initialization and CQUAD IEEE handling#158
Draft
krystophny wants to merge 2 commits into
Draft
Fix collision precompute initialization and CQUAD IEEE handling#158krystophny wants to merge 2 commits into
krystophny wants to merge 2 commits into
Conversation
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.
Summary
This PR fixes two initialization failures exposed by a trap-enabled multispecies QL run with B-spline collision bases.
log(m_b/m_a)while both module values were undefined. The PR initializes that precompute state to the equal-mass subdivision value and uses one subdivision helper in both finite-interval integrators.Divide-by-zero and overflow trapping remain enabled throughout. Invalid arithmetic in a collision kernel or any other user integrand remains fatal.
Physics and numerical invariants
The change preserves:
The intentional semantic change is limited to IEEE state: a finite successful CQUAD call no longer leaks an invalid flag generated inside CQUAD. Invalid or nonfinite physics callbacks still terminate the run.
Relation to the flux-pumping stack
This branch is stacked on PR #154 because the downstream diagnostic campaign uses that pinned executable history. The collision fix is independent of the join-normalization recorder and does not change the helical drive, source assembly, response normalization, or aligned-potential definition. It unblocks the rotating aligned-potential regression used to test cancellation of the corrugation-only current response.
Verification
Failing before the mass initialization:
Failing after the mass initialization but before the CQUAD guard:
Focused tests after both fixes:
cquad_ieee_guard_testchecks both sides of the boundary: an exact-zero integrand returns zero without leaking IEEE invalid, while a child process with an invalid integrand must fail.The trap-enabled production carrier completes without an IEEE or runtime marker. Its six reported transport channels agree with the previous non-halting executable to a maximum relative difference of
9.82e-14.The full rotating aligned-potential regression also passes:
Full repository pipeline:
The format warning is existing whole-file drift in
gsl_integration_routines_mod.f90; the touched lines and complete staged diff pass whitespace and line-length checks. No broad legacy reformat is included.