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

Ku/bounce alpha #1494

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Ku/bounce alpha #1494

wants to merge 4 commits into from

Conversation

unalmis
Copy link
Collaborator

@unalmis unalmis commented Dec 25, 2024

  • Enable tracking multiple fieldlines with Bounce2D
  • simplify ability to analyze drift over alpha as requested by a few people.
  • other changes requested on previous pull request.

@unalmis unalmis requested a review from rahulgaur104 December 25, 2024 11:18
@@ -180,52 +182,49 @@ def fun(pitch_inv):
),
)
)
return jnp.sum(v_tau * gamma_c**2, axis=-1)
return jnp.sum(v_tau * gamma_c**2, axis=-1).mean(axis=-2)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the tldr is to replace this mean over the alpha axis with the logic on gh/Gamma_c.

Copy link

codecov bot commented Dec 25, 2024

Codecov Report

Attention: Patch coverage is 94.87179% with 6 lines in your changes missing coverage. Please review.

Project coverage is 95.70%. Comparing base (7d378c2) to head (d58a7cf).

Files with missing lines Patch % Lines
desc/integrals/bounce_integral.py 90.00% 4 Missing ⚠️
desc/integrals/_bounce_utils.py 90.90% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1494      +/-   ##
==========================================
+ Coverage   95.64%   95.70%   +0.06%     
==========================================
  Files         101      101              
  Lines       25542    25574      +32     
==========================================
+ Hits        24430    24476      +46     
+ Misses       1112     1098      -14     
Files with missing lines Coverage Δ
desc/compute/_deprecated.py 100.00% <100.00%> (ø)
desc/compute/_fast_ion.py 100.00% <100.00%> (ø)
desc/compute/_geometry.py 99.07% <ø> (-0.47%) ⬇️
desc/compute/_neoclassical.py 100.00% <100.00%> (ø)
desc/integrals/basis.py 93.04% <100.00%> (ø)
desc/objectives/_fast_ion.py 98.27% <100.00%> (+1.72%) ⬆️
desc/objectives/_neoclassical.py 98.24% <100.00%> (+1.75%) ⬆️
desc/integrals/_bounce_utils.py 93.10% <90.90%> (+8.48%) ⬆️
desc/integrals/bounce_integral.py 97.59% <90.00%> (-1.90%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Contributor

github-actions bot commented Dec 25, 2024

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_lowres         |     -1.53 +/- 4.00     | -8.62e-03 +/- 2.25e-02 |  5.53e-01 +/- 1.9e-02  |  5.62e-01 +/- 1.1e-02  |
 test_equilibrium_init_medres            |     -0.44 +/- 3.04     | -1.92e-02 +/- 1.33e-01 |  4.35e+00 +/- 9.8e-02  |  4.37e+00 +/- 9.0e-02  |
 test_equilibrium_init_highres           |     +0.10 +/- 2.92     | +5.44e-03 +/- 1.65e-01 |  5.66e+00 +/- 1.1e-01  |  5.65e+00 +/- 1.2e-01  |
 test_objective_compile_dshape_current   |     -0.48 +/- 2.49     | -1.91e-02 +/- 9.95e-02 |  3.98e+00 +/- 3.7e-02  |  4.00e+00 +/- 9.2e-02  |
 test_objective_compute_dshape_current   |     -0.81 +/- 2.32     | -4.19e-05 +/- 1.20e-04 |  5.12e-03 +/- 7.3e-05  |  5.16e-03 +/- 9.5e-05  |
 test_objective_jac_dshape_current       |     -1.08 +/- 8.10     | -4.67e-04 +/- 3.49e-03 |  4.27e-02 +/- 3.0e-03  |  4.31e-02 +/- 1.8e-03  |
 test_perturb_2                          |     -0.55 +/- 3.10     | -1.12e-01 +/- 6.32e-01 |  2.03e+01 +/- 4.5e-01  |  2.04e+01 +/- 4.4e-01  |
 test_proximal_freeb_jac                 |     -1.08 +/- 1.57     | -8.06e-02 +/- 1.17e-01 |  7.36e+00 +/- 8.2e-02  |  7.44e+00 +/- 8.4e-02  |
 test_solve_fixed_iter                   |     -0.31 +/- 1.65     | -1.02e-01 +/- 5.42e-01 |  3.28e+01 +/- 3.9e-01  |  3.29e+01 +/- 3.8e-01  |
 test_LinearConstraintProjection_build   |     +0.05 +/- 2.98     | +5.53e-03 +/- 3.13e-01 |  1.05e+01 +/- 2.3e-01  |  1.05e+01 +/- 2.2e-01  |
 test_build_transform_fft_midres         |     +0.33 +/- 2.40     | +1.97e-03 +/- 1.42e-02 |  5.96e-01 +/- 8.7e-03  |  5.94e-01 +/- 1.1e-02  |
 test_build_transform_fft_highres        |     -0.43 +/- 1.81     | -4.12e-03 +/- 1.73e-02 |  9.49e-01 +/- 1.2e-02  |  9.54e-01 +/- 1.2e-02  |
 test_equilibrium_init_lowres            |     +0.21 +/- 1.66     | +7.87e-03 +/- 6.15e-02 |  3.72e+00 +/- 4.1e-02  |  3.71e+00 +/- 4.5e-02  |
 test_objective_compile_atf              |     +0.06 +/- 1.82     | +4.66e-03 +/- 1.45e-01 |  7.97e+00 +/- 9.3e-02  |  7.96e+00 +/- 1.1e-01  |
 test_objective_compute_atf              |     +0.33 +/- 5.21     | +5.21e-05 +/- 8.17e-04 |  1.57e-02 +/- 8.0e-04  |  1.57e-02 +/- 1.8e-04  |
 test_objective_jac_atf                  |     -0.03 +/- 3.19     | -6.31e-04 +/- 6.14e-02 |  1.92e+00 +/- 4.2e-02  |  1.92e+00 +/- 4.5e-02  |
 test_perturb_1                          |     -0.04 +/- 1.24     | -5.68e-03 +/- 1.77e-01 |  1.43e+01 +/- 1.1e-01  |  1.43e+01 +/- 1.4e-01  |
 test_proximal_jac_atf                   |     -0.23 +/- 0.86     | -1.84e-02 +/- 7.00e-02 |  8.13e+00 +/- 5.7e-02  |  8.15e+00 +/- 4.1e-02  |
 test_proximal_freeb_compute             |     -1.09 +/- 3.21     | -2.15e-03 +/- 6.32e-03 |  1.95e-01 +/- 3.9e-03  |  1.97e-01 +/- 4.9e-03  |
 test_solve_fixed_iter_compiled          |     -0.65 +/- 1.86     | -1.32e-01 +/- 3.74e-01 |  2.00e+01 +/- 1.7e-01  |  2.01e+01 +/- 3.4e-01  |

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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.

1 participant