Skip to content
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

added surface self-intersection test as well as second derivatives of surface aspect ratio #401

Merged
merged 8 commits into from
Apr 11, 2024

Conversation

andrewgiuliani
Copy link
Contributor

This PR introduces a surface self-intersection test, and second derivatives of the surface aspect ratio with respect to the surface degrees of freedom.

The algorithm that checks for surface self-intersection first computes a surface cross section at a given cylindrical angle phi. Then, approximating the cross section as a piecewise linear polyline, the Bentley-Ottmann algorithm is used to check if any line segments overlap one another.

The second derivatives of surface aspect ratio are useful if being used as a surface label in the BoozerLS algorithm.

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.64%. Comparing base (1fb6e87) to head (3d1413b).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #401      +/-   ##
==========================================
+ Coverage   91.56%   91.64%   +0.08%     
==========================================
  Files          74       74              
  Lines       12762    12987     +225     
==========================================
+ Hits        11685    11902     +217     
- Misses       1077     1085       +8     
Flag Coverage Δ
unittests 91.64% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@landreman
Copy link
Contributor

I think test_is_self_intersecting is not being run in the CI, since ground and bentley_ottman are not installed there. Does it make sense to add these packages to simsopt's requirements? Or do you think these packages and their sub-dependencies are onerous to include for some users? If we don't include these packages in simsopt's general requirements, then I'd suggest manually installing them in the CI and extensive CI as in this line so test_is_self_intersecting is run.

src/simsopt/geo/surface.py Show resolved Hide resolved
src/simsopt/geo/surface.py Show resolved Hide resolved
src/simsopt/geo/surface.py Show resolved Hide resolved
landreman
landreman previously approved these changes Apr 9, 2024
@andrewgiuliani andrewgiuliani merged commit 807404a into master Apr 11, 2024
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants