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

Vectorize boozer transform over multiple surfaces #1197

Merged
merged 15 commits into from
Sep 2, 2024
Merged

Conversation

f0uriest
Copy link
Member

@f0uriest f0uriest commented Aug 16, 2024

  • Allows the calculation of B_mn on tensor product grids with multiple flux surfaces.
  • Allows QuasisymmetryBoozer objective to target multiple surfaces at once
    - [ ] Allows Omnigenity objective to target multiple surfaces at once moved to Vectorize omnigenity objective over multiple surfaces #1225
  • Simplify boozer/QS plotting functions

Resolves #754

@f0uriest f0uriest marked this pull request as draft August 16, 2024 05:04
Copy link
Contributor

github-actions bot commented Aug 16, 2024

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_lowres         |     -6.55 +/- 5.92     | -3.63e-02 +/- 3.28e-02 |  5.18e-01 +/- 2.8e-02  |  5.54e-01 +/- 1.7e-02  |
 test_equilibrium_init_medres            |     -3.45 +/- 4.72     | -1.54e-01 +/- 2.10e-01 |  4.30e+00 +/- 2.1e-01  |  4.45e+00 +/- 4.6e-02  |
 test_equilibrium_init_highres           |     +1.27 +/- 2.23     | +7.16e-02 +/- 1.26e-01 |  5.71e+00 +/- 7.4e-02  |  5.64e+00 +/- 1.0e-01  |
 test_objective_compile_dshape_current   |     +0.62 +/- 1.14     | +2.38e-02 +/- 4.42e-02 |  3.90e+00 +/- 2.0e-02  |  3.87e+00 +/- 3.9e-02  |
 test_objective_compute_dshape_current   |     -2.44 +/- 2.38     | -8.71e-05 +/- 8.49e-05 |  3.48e-03 +/- 5.3e-05  |  3.57e-03 +/- 6.7e-05  |
 test_objective_jac_dshape_current       |     -0.51 +/- 7.02     | -2.15e-04 +/- 2.93e-03 |  4.15e-02 +/- 2.6e-03  |  4.17e-02 +/- 1.2e-03  |
 test_perturb_2                          |     +0.90 +/- 1.57     | +1.60e-01 +/- 2.79e-01 |  1.80e+01 +/- 2.0e-01  |  1.78e+01 +/- 1.9e-01  |
 test_proximal_freeb_jac                 |     -0.47 +/- 2.09     | -3.53e-02 +/- 1.57e-01 |  7.49e+00 +/- 1.5e-01  |  7.52e+00 +/- 4.3e-02  |
 test_solve_fixed_iter                   |     +1.00 +/- 61.17    | +4.90e-02 +/- 3.01e+00 |  4.97e+00 +/- 2.1e+00  |  4.92e+00 +/- 2.2e+00  |

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.35%. Comparing base (941f020) to head (4920b96).
Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1197      +/-   ##
==========================================
+ Coverage   95.31%   95.35%   +0.03%     
==========================================
  Files          90       90              
  Lines       22713    22755      +42     
==========================================
+ Hits        21649    21697      +48     
+ Misses       1064     1058       -6     
Files with missing lines Coverage Δ
desc/compute/_omnigenity.py 100.00% <100.00%> (ø)
desc/compute/data_index.py 97.22% <100.00%> (+0.07%) ⬆️
desc/compute/utils.py 95.43% <100.00%> (+0.21%) ⬆️
desc/objectives/_omnigenity.py 96.30% <100.00%> (ø)
desc/plotting.py 96.10% <100.00%> (+0.44%) ⬆️

... and 1 file with indirect coverage changes

@f0uriest
Copy link
Member Author

@unalmis can you look at adding the boozer stuff to test_axis_limits.py? It looks like we'll still need some special logic when integrating over theta/zeta for the _mn qtys.

@f0uriest f0uriest marked this pull request as ready for review August 27, 2024 04:13
@dpanici
Copy link
Collaborator

dpanici commented Aug 28, 2024

merge before #680

@f0uriest f0uriest requested review from a team, rahulgaur104, ddudt, dpanici, kianorr, sinaatalay, unalmis and YigitElma and removed request for a team August 28, 2024 19:48
@unalmis
Copy link
Collaborator

unalmis commented Aug 28, 2024

when you merge master please fix units label here:

units="T \\cdot m}",

Copy link
Collaborator

@dpanici dpanici left a comment

Choose a reason for hiding this comment

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

what changed in the master compute data, out of curiosity?

@f0uriest
Copy link
Member Author

f0uriest commented Sep 2, 2024

what changed in the master compute data, out of curiosity?

The size of the boozer data. I think I mentioned in the meeting last week, master is currently wrong if you try to compute the boozer stuff on a grid with more than 1 surface (as is done in test_compute_everything. It would fit the whole volume to a single double fourier series, effectively doing some sort of radial average of the boozer qtys. With this PR it now correctly returns different data for each surface.

@f0uriest f0uriest merged commit 60de6fc into master Sep 2, 2024
24 checks passed
@f0uriest f0uriest deleted the rc/boozer branch September 2, 2024 20:25
ddudt added a commit that referenced this pull request Oct 1, 2024
Hot fix for a bug introduced by #1197.
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.

Improving DESC Surface Boozer Transform
4 participants