Test the Jacobian orientation with a quantity the lasym rotation preserves - #28
Open
CharlesCNorton wants to merge 1 commit into
Open
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.
Fixes #27.
The orientation test runs on a boundary that has already been rotated in the poloidal angle when
lasymis set, andrtest*ztestis not invariant under that rotation. The m=1 determinant is, and it reduces tortest*ztestfor a stellarator-symmetric boundary, whererbscandzbccare zero, so the symmetric path keeps the criterion it had.Checked with
input.up_down_asym_currentrelabelled bytheta -> pi - theta, which leaves the surface alone and reverses the poloidal direction. Before this change the rotation leavesztestat 3.7e-17, the test cannot fire, and the run takes 7 Jacobian resets and stops at the 2001 iteration cap withfsqr = 2.07e-02. After it the run converges in 1544 iterations tofsqr = 8.7e-12, andvolume_p,aspect,Rmajor_p,Aminor_p,ctor,buco,jcurv,presfandphipfagree with the run on the boundary as given to machine precision. What remains is the poloidal gauge: the two runs differ by the residual rotation, which shows up in the grid-sampled extremarmax_surfandzmax_surfand iniotafat the 1e-3 level.input.up_down_asym_currentandinput.cth_like_fixed_bdy_asymare unchanged bit for bit, so the test is inert on a boundary that is already oriented correctly, and a stellarator-symmetric run never enters the branch.