Skip to content

Conversation

@daringli
Copy link
Contributor

@daringli daringli commented Dec 2, 2025

Adds support for non-stellarator symmetric configurations in vmec_compute_geometry.

Also adds a relevant regression and sqrt(g) calculation test.

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.99%. Comparing base (ab9096f) to head (2d0d7d3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #575      +/-   ##
==========================================
+ Coverage   84.89%   84.99%   +0.09%     
==========================================
  Files          83       83              
  Lines       16291    16324      +33     
==========================================
+ Hits        13830    13874      +44     
+ Misses       2461     2450      -11     
Flag Coverage Δ
unittests 84.99% <100.00%> (+0.09%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@smiet smiet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though I am not a great fan of this 500+ line function, the added functionality is great.

I did not go through the einsum-wrangling with a fine-toothed comb, but trust.

One comment about the test.


data = vmec_compute_geometry(vmec, s, theta, phi)

# More arrays to check against can be printed by uncommenting this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this comment, I gather that the precalc arrays are computed from the current state of the code. This makes them regression tests. Have you verified that these precalculated arrays are correct against physical properties of the input.basic_non_stellsym?

Could some test be added that is clearly non-stellarator-symmetric? Not sure of the interpretation of these arrays, but you could test whether the evaluation of quantities at +phi are not equal to that at minus phi.

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