-
Couldn't load subscription status.
- Fork 71
Jax curve pr #528
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
Jax curve pr #528
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #528 +/- ##
==========================================
+ Coverage 92.55% 92.64% +0.09%
==========================================
Files 83 83
Lines 16027 16190 +163
==========================================
+ Hits 14834 15000 +166
+ Misses 1193 1190 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
What is the create_planar_curves_between_two_toroidal_surfaces for?
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.
just small comments.
| TEST_DIR = (Path(__file__).parent / ".." / "test_files").resolve() | ||
| filename = TEST_DIR / 'input.LandremanPaul2021_QA' | ||
| nphi, ntheta = 8, 8 | ||
| with ScratchDir("."): |
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.
should we be using a different directory for scratchdir?
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.
Need to fix this elsewhere too then
|
@landreman @mishapadidar Last call -- please approve if you don't see anything else. Thanks! |
|
Reminder to please approve! |
src/simsopt/geo/curve.py
Outdated
| """ | ||
| return self.curve.num_dofs() | ||
|
|
||
| def centroid(self): |
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.
The base Curve class already has the same centroid function, and JaxCurve inherits from the base Curve class. So I would guess this function in JaxCurve is superfluous - can it be removed?
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.
Looking at this again, I do not see a JaxCurve version of the function. The lines you highlighted above seem to be for a RotatedCurve object. For this, I think the RotatedCurve should not inherit, since it should call centroid_pure with its own gamma and gammadash, which are wrappers over the inherited curve's gamma and gammadash. Let me know if that is not right though!
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.
Im a bit confused here. It seems like the right thing to do is for the Curve class to have a centroid function, and the JaxCurve class to have centroid_pure. Then the RotataedCurve can just inherit from Curve, right?
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.
What is wrong with having centroid_pure for the Curve, and then both JaxCurve and RotatedCurve inheriting that function?
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.
I agree with Alan - the present arrangement with centroid() in the base Curve class looks good.
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.
code mostly looks good. My main concern is with the downsample parameter in the CurveCurveDistance class. If there is another, cleaner, approach to reducing the computational cost of the CurveCurveDistance, it is welcome.
src/simsopt/geo/curve.py
Outdated
| """ | ||
| return self.curve.num_dofs() | ||
|
|
||
| def centroid(self): |
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.
Im a bit confused here. It seems like the right thing to do is for the Curve class to have a centroid function, and the JaxCurve class to have centroid_pure. Then the RotataedCurve can just inherit from Curve, right?
|
Looks good to me now. But ugh the CI is failing now for some reason that's probably unrelated to this PR. Let's see if we can fix the CI in the |
|
@landreman @mbkumar Suddenly the C++ build seems to be failing here, on code that I have not touched. Any idea why? Oops sorry just saw your comment Matt, thanks. |
|
Pybind11 released a new version today with an ABI change. Reverting back to
older pybind11 should fix the issue
…On Thu, Jul 10, 2025, 4:22 PM Alan Kaptanoglu ***@***.***> wrote:
*akaptano* left a comment (hiddenSymmetries/simsopt#528)
<#528 (comment)>
@landreman <https://github.com/landreman> @mbkumar
<https://github.com/mbkumar> Suddenly the C++ build seems to be failing
here, on code that I have not touched. Any idea why?
—
Reply to this email directly, view it on GitHub
<#528 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA62VEF34UUWZUNE7JZXJUD3H3DRLAVCNFSM6AAAAAB6C2FJUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANJYHE2DGOBYHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Thanks. Just fixed that and this PR should be ready for approval. |
Adds in functionality from force_and_torque_overhaul PR #509, including: