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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flip_theta
compatibility function #1248flip_theta
compatibility function #1248Changes from all commits
a94782e
098f7f2
c30251e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 134 in desc/compat.py
Codecov / codecov/patch
desc/compat.py#L132-L134
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this not flip the theta sign too?
I am confused, do you want this to only shift theta, or shift and flip?
simple example to illustrate my confusion:
R = R0 + a cos t
Z = -a sin t
is a CW poloidal angle circular torus
after flip_theta(eq) we get
R = R0 - a cos(t_new)
Z = -a sin(t_new)
now this is a CCW poloidal angle.
So what you have rn is$\theta_{new} \rightarrow \pi - \theta_{old}$ I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it does not flip the sign of theta. This flips the sign of all odd m modes, including both sine and cosine modes. So in your example, the final Z boundary will also flip sign to:
Z = +a sin(t_new)
and then the poloidal angle still increases clockwise.
The tests check that the Jacobian$\sqrt(g)$ is still positive after the flip.