Repository navigation
Conversation
… and grow the reduction store on demand A qlow that is itself a rational at some n (1.5 at n=2, 3 at n=3,6,9) put the integration start exactly on a singular surface, where the chunker stopped with an error. sing_min! now moves the start one crossing standoff singfac_min/|n q'| past any surface it lands on, with a warning. The Gaussian-reduction records (fixfac, index, fixstep, sing_flag, zeroed_idx) were fixed at numunorms_init; high-n runs reduce at every rational and every renorm_threshold trigger, overflowed the store at n ≳ 20, and lost the records transform_u! needs, so δW stayed right while the ξ profiles came back as garbage. The store now doubles on demand. Unit tests for both; verified on the DIII-D-like example at n=2 (ξ profiles bitwise identical between numunorms_init=3 and 100). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e growth Skip the move when singfac_min = 0 (no standoff, no crossings) or q' = 0 at the surface (infinite standoff), error instead of moving past psilim, and grow a zero-capacity reduction store to one record. Tests for each. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
|
Note that the reduction storage growth is done in #520, but this will probably get merged first so its fine |
matt-pharr
requested changes
Nov 24, 2026
matt-pharr
left a comment
Collaborator
There was a problem hiding this comment.
This change is good progress but it has a few issues:
- Kinetic runs can move the boundary at a regular point. The new helper moves psilow using the ideal q = m/n surfaces before the solver finds the kinetic singularities of F̄. If the kinetic resonance is displaced, a rational qlow can move the imposed boundary and drop an ideal surface from the reported results even when F̄ is regular there. The kinetic path should check the requested start against its detected kinetic surfaces.
- A rational at the first grid node still gets missed. I reproduced this with an increasing profile from q = 1.5 to 1.9, n = 2, and qlow = 1.5. The surface finder starts its search at m = 4, so it misses m = 3 at the first node. The new helper receives an empty surface list and leaves the ideal solver exactly on the resonance. This needs a test through surface discovery.
- A start exactly one standoff below a surface can still throw. With psi_s = 0.75 and standoff 2.5e-5, the helper leaves psilow = 0.749975 untouched, then the chunker rejects it. I reproduced the exception in Julia. Comparing psilow directly against psi_s - standoff and psi_s + standoff would make the helper agree with the chunker at the rounded endpoint.
This branch has not been deployed
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
A
qlowthat is itself a rational at some n (1.5 at n = 2, 3 at n = 3, 6, 9, …) used to stop the run at the first chunk because the integration started exactly on a singular surface; the start is now moved one crossing standoff past that surface, with a warning. High-n runs (n ≳ 20 on the DIII-D-like example) overflowed the fixed-size store of Gaussian-reduction records, which left δW correct but made the reconstructed ξ profiles garbage; the store now grows on demand.Regression report
Notes for reviewers
numunorms_init = 3are now bitwise identical to those with 100 (the store grows 3 → 6 → 12 → 24 → 48); on develop they differed by a relative 4e49.sing_min!sets the commonpsilow. Examples and harness decks useqlow = 1.02or the default, so nothing in the harness moves.ising_starttreats such a surface as still to be crossed. Improbable, left as is.grow_reduction_store!also fixes a latent bug: the old warn-and-drop branch kept writing the overflow reduction into the last record.🤖 Generated with Claude Code