test: reproduce class grid blowup from failed orbit nodes - #156
Draft
krystophny wants to merge 2 commits into
Draft
test: reproduce class grid blowup from failed orbit nodes#156krystophny wants to merge 2 commits into
krystophny wants to merge 2 commits into
Conversation
get_matrix_doublecount takes no arguments and only writes amat at the very end, so both of its error returns (starter failure, find_bounce hitting ierrfield when the orbit leaves the field domain or crosses the wall) left amat holding the previous node's values. The caller had no way to tell a failed evaluation from a good one. Set ierr_get_matrix and clear amat on every failure path instead. Two callers silently depended on the old stale-amat convention and are switched to the explicit status. Both poisoned amat(3,1) with huge() and tested whether it survived the call: bound_class_wall/orbit_lost to detect wall losses, and bound_class_delphi/eval_delphi to make a failed orbit read as beyond delphi_max. Clearing amat without updating them would have silently disabled wall trimming and X-point trimming, with no diagnostic. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Drives sample_matrix with a stub evaluator that is linear outside one failed stretch. Order-7 Lagrange reproduces a linear function exactly, so a correct refinement needs no splits at all and the grid must stay at its initial 9 nodes. The test currently FAILS: the refinement chases the failed nodes to npoi=355 and exhausts itermax. sample_matrix has no access to the status reported by the previous commit, so it reads the cleared amat as structure and keeps bisecting towards it. Skipping failed nodes in the refinement decision is not part of this branch yet. Linked with LINK_GROUP:RESCAN because sample_matrix pulls sub_potato module state, which calls into a profile_input implementation that potato_base intentionally does not provide. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
This draft PR publishes the existing committed state of
cleanup/pr121so the local branch/worktree can be retired after review.Checks were not run in this cleanup operation; the branch-specific CI should provide validation.