Repository navigation
End Meiss lines behind the wall where h_phi vanishes - #783
Merged
Merged
Conversation
On a wall chart that extends past the wall, h_phi = b . e_phi can change sign between the wall and the chart edge, and the radial Meiss ODE fails there (W7-X KJM chart: 1588 of 4032 lines, all at least 0.2 in r behind the wall). With a wall, a line now ends at the last node where |h_phi| is at least 0.2 of its first value, and initialisation checks that every ended line crosses the wall before that node.
The line through the node where A is gauged to zero starts with chi = 0 and chi' = 0; with a purely relative error scale the step fell to roundoff and the W7-X wall-chart construction failed at its first node.
In W7-X one Meiss line runs through an opening of the STL wall before h_phi vanishes, so the wall alone does not keep markers inside the valid canonical domain. Markers beyond the end of a line of their grid cell now stop as numerical domain exits, and initialisation reports such lines instead of stopping. The cut fraction drops to 0.1: the smallest ratio met before the wall on any other W7-X line is 0.21.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 9, 2026
A unit floor removed the accuracy demanded of SPECTRE constructions in SI units (test_spectre_freeboundary expects a step-limit failure at ode_relerr 1e-4). The floor is now 1e-6 of the change of lambda and chi over one grid interval.
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.
Risk tier
Correctness contract
Intended behavior change
On a wall chart that reaches past the wall, the radial Meiss ODE$\lambda' = -h_r/h_\varphi$ has no solution where $h_\varphi = \mathbf b\cdot\mathbf e_\varphi$ changes sign. On the W7-X KJM map2disc chart (LCFS + 0.8 m) in the frozen-current field of W6 t = 1.05 s this happens on 1588 of 4032 radial lines between the wall and the chart edge, and
init_meissstopped with "Meiss transformation ODE failed".With$|h_\varphi| \ge 0.1,|h_\varphi(r_\text{min})|$ ; $\lambda$ and $\chi$ are held from there (
wall_inputset, a line now ends at the last node wherecut_line). Along the W7-X Meiss lines the smallest ratio met before the wall is 0.21, except on one line that runs through an opening of the STL wall and never meets it. A marker beyond the end of a line of its grid cell therefore stops as a numerical domain exit (orbit_exit_code101) instead of being traced in a non-canonical field (beyond_meiss_cut, checked after the wall query of each symplectic microstep, also for Albert via its Meiss radius). Initialisation reports how many ended lines meet the wall first.The line through the node where$A$ is gauged to zero starts with $\chi = \chi' = 0$ ; with a purely relative error scale its first step fell to roundoff (W7-X: $\theta = 0$ , $\varphi = 0$ with a smooth right-hand side). The ODE call now passes libneo's $\lambda$ and $\chi$ over one grid interval, so it prevents the underflow without relaxing the requested tolerance (
ierr = 1at node 2 ofscale_floor, set to 1e-6 of the change oftest_spectre_freeboundarystill sees its step-limit failure).Behavior that must not change
Without
wall_inputno line is cut and an ODE failure still stops initialisation.Coordinate / unit conventions
Unchanged.
Numerical invariants
The canonical form holds up to
r_cut(i_th, i_phi); no marker is traced beyond it.Tests added
test_meiss_line_cut(chart whose outer surfaces tilt toroidally,Golden-record impact
Verification
The Meiss tests (
test_meiss_line_cut,test_field_can_meiss_config,test_chartmap_wall_losses,test_profile_radius_meiss*) pass locally with GCC 16. The W7-X numbers come from diagnostics on sCluster in the W6 t = 1.05 s frozen-current field.Chris&AI