-
Notifications
You must be signed in to change notification settings - Fork 26
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
ε and Γ_c with Fourier Bounce #1290
Conversation
| benchmark_name | dt(%) | dt(s) | t_new(s) | t_old(s) |
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
test_build_transform_fft_lowres | +3.05 +/- 9.20 | +1.56e-02 +/- 4.73e-02 | 5.29e-01 +/- 4.7e-02 | 5.14e-01 +/- 6.8e-03 |
test_equilibrium_init_medres | +2.02 +/- 2.52 | +8.18e-02 +/- 1.02e-01 | 4.13e+00 +/- 9.8e-02 | 4.04e+00 +/- 2.9e-02 |
test_equilibrium_init_highres | +1.40 +/- 2.54 | +7.45e-02 +/- 1.35e-01 | 5.39e+00 +/- 1.2e-01 | 5.31e+00 +/- 5.6e-02 |
test_objective_compile_dshape_current | -0.25 +/- 0.82 | -9.62e-03 +/- 3.21e-02 | 3.88e+00 +/- 2.1e-02 | 3.89e+00 +/- 2.5e-02 |
test_objective_compute_dshape_current | +0.88 +/- 2.14 | +4.49e-05 +/- 1.10e-04 | 5.16e-03 +/- 1.0e-04 | 5.11e-03 +/- 3.5e-05 |
test_objective_jac_dshape_current | -1.55 +/- 6.11 | -6.69e-04 +/- 2.63e-03 | 4.24e-02 +/- 1.7e-03 | 4.30e-02 +/- 2.0e-03 |
test_perturb_2 | -0.01 +/- 1.01 | -2.69e-03 +/- 1.95e-01 | 1.94e+01 +/- 1.0e-01 | 1.94e+01 +/- 1.7e-01 |
test_proximal_freeb_jac | -0.41 +/- 1.13 | -3.02e-02 +/- 8.28e-02 | 7.32e+00 +/- 4.8e-02 | 7.35e+00 +/- 6.8e-02 |
test_solve_fixed_iter | +0.19 +/- 1.74 | +5.86e-02 +/- 5.45e-01 | 3.13e+01 +/- 4.3e-01 | 3.13e+01 +/- 3.3e-01 |
test_LinearConstraintProjection_build | -0.79 +/- 2.92 | -7.98e-02 +/- 2.96e-01 | 1.00e+01 +/- 2.0e-01 | 1.01e+01 +/- 2.2e-01 |
test_build_transform_fft_midres | +4.68 +/- 3.50 | +2.81e-02 +/- 2.11e-02 | 6.30e-01 +/- 2.0e-02 | 6.02e-01 +/- 7.4e-03 |
test_build_transform_fft_highres | +1.65 +/- 2.35 | +1.60e-02 +/- 2.29e-02 | 9.88e-01 +/- 2.0e-02 | 9.72e-01 +/- 1.0e-02 |
test_equilibrium_init_lowres | +5.18 +/- 3.07 | +1.97e-01 +/- 1.16e-01 | 3.99e+00 +/- 1.1e-01 | 3.79e+00 +/- 3.3e-02 |
test_objective_compile_atf | -0.07 +/- 1.90 | -5.81e-03 +/- 1.55e-01 | 8.12e+00 +/- 1.2e-01 | 8.13e+00 +/- 9.9e-02 |
test_objective_compute_atf | +0.07 +/- 2.36 | +1.17e-05 +/- 3.73e-04 | 1.58e-02 +/- 2.7e-04 | 1.58e-02 +/- 2.6e-04 |
test_objective_jac_atf | -0.66 +/- 2.43 | -1.33e-02 +/- 4.86e-02 | 1.99e+00 +/- 4.2e-02 | 2.00e+00 +/- 2.4e-02 |
test_perturb_1 | +0.14 +/- 1.33 | +2.08e-02 +/- 1.94e-01 | 1.46e+01 +/- 1.6e-01 | 1.46e+01 +/- 1.1e-01 |
test_proximal_jac_atf | +0.46 +/- 0.82 | +3.76e-02 +/- 6.78e-02 | 8.27e+00 +/- 4.1e-02 | 8.23e+00 +/- 5.4e-02 |
test_proximal_freeb_compute | -0.42 +/- 1.32 | -8.31e-04 +/- 2.63e-03 | 1.98e-01 +/- 1.5e-03 | 1.99e-01 +/- 2.1e-03 |
test_solve_fixed_iter_compiled | +0.31 +/- 0.57 | +6.31e-02 +/- 1.17e-01 | 2.05e+01 +/- 1.0e-01 | 2.04e+01 +/- 5.3e-02 | |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1290 +/- ##
==========================================
+ Coverage 95.61% 95.64% +0.03%
==========================================
Files 98 101 +3
Lines 25425 25542 +117
==========================================
+ Hits 24309 24429 +120
+ Misses 1116 1113 -3
|
all requests are now done. |
Set default automorphism to None to simplify for user in case they forget to set to None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bunch of minor points. I'll ask some more questions over the next hour.
} | ||
|
||
|
||
def _compute(fun, fun_data, data, grid, num_pitch, simp=False, reduce=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the AD chain go through each iteration of the loop when you do multiple alpha or rho values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would I test this
"max_tz |B|", | ||
"cvdrift0", | ||
"gbdrift (periodic)", | ||
"gbdrift (secular)/phi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a test to ensure that the secular gbdrift gives the same answer as periodic gbdrift as field line length is increased? Otherwise, it can be added later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will not because the secular term drives the computation here to zero. We warn this in the objective docstring for now. Without the secular term it converges quickly to basically
def interp_to_argmin( | ||
h, points, knots, g, dg_dz, method="cubic", beta=-100, upper_sentinel=1e2 | ||
): | ||
def interp_to_argmin(h, points, knots, g, dg_dz, method="cubic"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No suggestion here but can you explain what this function is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We interpolate the function h
to the global minimum of g
that lies between each bounce point. In our application
"""Test effective ripple with W7-X against NEO.""" | ||
eq = get("W7-X") | ||
rho = np.linspace(0, 1, 10) | ||
grid = LinearGrid(rho=rho, M=eq.M_grid, N=eq.N_grid, NFP=eq.NFP, sym=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How sensitive is the ripple to the grid resolution now?
This PR updates the
Gamma_c
,Gamma_c Velasco
Gamma_c (Nemov and Velasco et. al) Γ_c #1042effective ripple
Effective ripple ε #1003objectives to use the numerical methods from #1119
Also includes some incremental performance improvements