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

Simplified Bout computation in free boundary #1600

Draft
wants to merge 198 commits into
base: master
Choose a base branch
from
Draft

Conversation

unalmis
Copy link
Collaborator

@unalmis unalmis commented Feb 23, 2025

This PR goal is to separate the computation of the inner and outer magnetic fields in the free boundary problem. The plan is to do constrained optimization to avoid inverting the large system for the Fourier harmonics of ϕ.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@unalmis unalmis self-assigned this Feb 23, 2025
Copy link
Contributor

github-actions bot commented Feb 23, 2025

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_midres         |     -1.30 +/- 8.12     | -8.60e-03 +/- 5.38e-02 |  6.54e-01 +/- 4.7e-02  |  6.62e-01 +/- 2.7e-02  |
 test_build_transform_fft_highres        |     +0.02 +/- 4.25     | +2.32e-04 +/- 3.98e-02 |  9.35e-01 +/- 3.9e-02  |  9.35e-01 +/- 9.8e-03  |
 test_equilibrium_init_lowres            |     +0.69 +/- 1.64     | +2.82e-02 +/- 6.67e-02 |  4.11e+00 +/- 4.2e-02  |  4.08e+00 +/- 5.2e-02  |
 test_objective_compile_atf              |     -0.41 +/- 2.20     | -3.44e-02 +/- 1.85e-01 |  8.40e+00 +/- 1.5e-01  |  8.43e+00 +/- 1.0e-01  |
 test_objective_compute_atf              |     -0.22 +/- 2.06     | -3.55e-05 +/- 3.36e-04 |  1.63e-02 +/- 2.5e-04  |  1.63e-02 +/- 2.3e-04  |
 test_objective_jac_atf                  |     +0.73 +/- 1.92     | +1.45e-02 +/- 3.80e-02 |  1.99e+00 +/- 3.0e-02  |  1.97e+00 +/- 2.3e-02  |
 test_perturb_1                          |     +0.15 +/- 2.53     | +2.34e-02 +/- 3.90e-01 |  1.54e+01 +/- 3.8e-01  |  1.54e+01 +/- 9.6e-02  |
 test_proximal_jac_atf                   |     +0.75 +/- 1.22     | +6.03e-02 +/- 9.89e-02 |  8.16e+00 +/- 7.6e-02  |  8.10e+00 +/- 6.3e-02  |
+test_proximal_freeb_compute             |    -10.01 +/- 1.26     | -2.17e-02 +/- 2.73e-03 |  1.95e-01 +/- 2.3e-03  |  2.17e-01 +/- 1.4e-03  |
 test_solve_fixed_iter                   |     -0.21 +/- 1.66     | -6.86e-02 +/- 5.54e-01 |  3.32e+01 +/- 2.9e-01  |  3.33e+01 +/- 4.7e-01  |
 test_objective_compute_ripple           |     +0.59 +/- 2.33     | +4.10e-03 +/- 1.62e-02 |  7.00e-01 +/- 1.4e-02  |  6.96e-01 +/- 8.7e-03  |
 test_objective_grad_ripple              |     +0.19 +/- 1.64     | +5.05e-03 +/- 4.36e-02 |  2.66e+00 +/- 3.3e-02  |  2.66e+00 +/- 2.8e-02  |
 test_build_transform_fft_lowres         |     +0.48 +/- 2.42     | +3.20e-03 +/- 1.60e-02 |  6.65e-01 +/- 1.0e-02  |  6.62e-01 +/- 1.2e-02  |
 test_equilibrium_init_medres            |     -0.95 +/- 0.91     | -4.46e-02 +/- 4.29e-02 |  4.67e+00 +/- 3.7e-02  |  4.71e+00 +/- 2.2e-02  |
 test_equilibrium_init_highres           |     +0.33 +/- 4.03     | +1.88e-02 +/- 2.30e-01 |  5.72e+00 +/- 2.2e-01  |  5.70e+00 +/- 6.1e-02  |
 test_objective_compile_dshape_current   |     -3.18 +/- 6.64     | -1.41e-01 +/- 2.96e-01 |  4.31e+00 +/- 2.6e-01  |  4.45e+00 +/- 1.4e-01  |
 test_objective_compute_dshape_current   |     +0.78 +/- 3.87     | +4.46e-05 +/- 2.20e-04 |  5.75e-03 +/- 1.7e-04  |  5.70e-03 +/- 1.4e-04  |
 test_objective_jac_dshape_current       |     +1.63 +/- 6.44     | +7.19e-04 +/- 2.84e-03 |  4.49e-02 +/- 1.9e-03  |  4.41e-02 +/- 2.1e-03  |
 test_perturb_2                          |     -0.94 +/- 1.86     | -2.08e-01 +/- 4.10e-01 |  2.18e+01 +/- 2.5e-01  |  2.20e+01 +/- 3.2e-01  |
 test_proximal_jac_atf_with_eq_update    |     -0.56 +/- 0.85     | -9.64e-02 +/- 1.46e-01 |  1.71e+01 +/- 1.2e-01  |  1.72e+01 +/- 8.6e-02  |
+test_proximal_freeb_jac                 |    -32.01 +/- 2.35     | -2.46e+00 +/- 1.81e-01 |  5.23e+00 +/- 1.3e-01  |  7.70e+00 +/- 1.3e-01  |
 test_solve_fixed_iter_compiled          |     +0.14 +/- 0.82     | +3.13e-02 +/- 1.77e-01 |  2.17e+01 +/- 1.6e-01  |  2.16e+01 +/- 6.7e-02  |
 test_LinearConstraintProjection_build   |     -0.16 +/- 2.35     | -1.93e-02 +/- 2.81e-01 |  1.19e+01 +/- 1.8e-01  |  1.19e+01 +/- 2.1e-01  |
 test_objective_compute_ripple_spline    |     +1.14 +/- 1.64     | +4.02e-03 +/- 5.77e-03 |  3.57e-01 +/- 4.0e-03  |  3.53e-01 +/- 4.2e-03  |
 test_objective_grad_ripple_spline       |     -0.01 +/- 2.16     | -1.65e-04 +/- 3.07e-02 |  1.42e+00 +/- 2.3e-02  |  1.42e+00 +/- 2.0e-02  |

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.

4 participants