Repository navigation
Guess the axis when the initial Jacobian changes sign - #31
Merged
Merged
Conversation
pygvec run stopped with 'JACOBIAN WITH SIGN CHANGE FOUND AFTER INITIALIZATION' when the given or averaged axis made the initial interpolation fold over, as on many bean-shaped stellarators. Like VMEC's guess_axis, retry once with the axis that maximises the smallest Jacobian of the initial interpolation in each toroidal plane, which is a linear program because that Jacobian is linear in the axis position.
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.
pygvec runstops withJACOBIAN WITH SIGN CHANGE FOUND AFTER INITIALIZATIONwhen the given or averaged axis makes the initial interpolation fold over. This happens on many bean-shaped stellarators (NCSX, W7-X, CHS, the Landreman-Paul QA/QH configurations). VMEC handles the same situation withguess_axisand continues.The fixed-boundary runner now retries once, with the axis from the new
gvec.util.guess_axis, and logs a warning. In each toroidal plane the Jacobian of the initial interpolation (axis blended into the m = 0 modes like 1 - rho^2, other modes like rho^m) is linear in the axis position. So the axis that maximises its smallest value solves a small linear program, where VMEC uses a grid search. The planes are then fitted with the axis Fourier modes. Runs that restart from a state are not retried.test_run_guesses_axis_after_bad_jacobian: a circular torus with its axis near the outer edge, for whichguess_axisreturns the centre and the run continues. It fails on develop.Chris&AI