-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix .change_resolution(sym=False)
for FourierRZToroidalSurface
, ZernikeRZToroidalSection
and FourierRZCurve
#1593
Conversation
…esolution, the symmetry would not change
| benchmark_name | dt(%) | dt(s) | t_new(s) | t_old(s) |
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
test_build_transform_fft_midres | +2.37 +/- 6.78 | +1.51e-02 +/- 4.32e-02 | 6.53e-01 +/- 2.5e-02 | 6.38e-01 +/- 3.5e-02 |
test_build_transform_fft_highres | +1.90 +/- 5.88 | +1.77e-02 +/- 5.46e-02 | 9.46e-01 +/- 5.3e-02 | 9.28e-01 +/- 1.2e-02 |
test_equilibrium_init_lowres | -0.89 +/- 3.52 | -3.66e-02 +/- 1.45e-01 | 4.08e+00 +/- 5.8e-02 | 4.12e+00 +/- 1.3e-01 |
test_objective_compile_atf | +1.38 +/- 3.19 | +1.15e-01 +/- 2.65e-01 | 8.43e+00 +/- 1.9e-01 | 8.31e+00 +/- 1.8e-01 |
test_objective_compute_atf | -2.42 +/- 4.63 | -4.09e-04 +/- 7.81e-04 | 1.65e-02 +/- 4.9e-04 | 1.69e-02 +/- 6.1e-04 |
test_objective_jac_atf | +0.00 +/- 1.53 | +1.05e-05 +/- 3.02e-02 | 1.98e+00 +/- 2.2e-02 | 1.98e+00 +/- 2.0e-02 |
test_perturb_1 | +0.22 +/- 0.96 | +3.43e-02 +/- 1.47e-01 | 1.53e+01 +/- 1.2e-01 | 1.53e+01 +/- 8.9e-02 |
test_proximal_jac_atf | -0.16 +/- 1.29 | -1.30e-02 +/- 1.04e-01 | 8.07e+00 +/- 7.6e-02 | 8.08e+00 +/- 7.1e-02 |
test_proximal_freeb_compute | +0.34 +/- 1.83 | +7.33e-04 +/- 3.93e-03 | 2.15e-01 +/- 1.5e-03 | 2.14e-01 +/- 3.6e-03 |
test_solve_fixed_iter | +0.83 +/- 1.66 | +2.72e-01 +/- 5.46e-01 | 3.32e+01 +/- 4.5e-01 | 3.29e+01 +/- 3.1e-01 |
test_objective_compute_ripple | +0.68 +/- 2.88 | +4.72e-03 +/- 2.00e-02 | 6.99e-01 +/- 1.0e-02 | 6.94e-01 +/- 1.7e-02 |
test_objective_grad_ripple | +0.12 +/- 1.68 | +3.17e-03 +/- 4.46e-02 | 2.66e+00 +/- 1.9e-02 | 2.66e+00 +/- 4.0e-02 |
test_build_transform_fft_lowres | +4.61 +/- 5.68 | +2.88e-02 +/- 3.55e-02 | 6.53e-01 +/- 2.3e-02 | 6.25e-01 +/- 2.7e-02 |
test_equilibrium_init_medres | -0.01 +/- 3.39 | -5.25e-04 +/- 1.49e-01 | 4.39e+00 +/- 1.3e-01 | 4.39e+00 +/- 6.9e-02 |
test_equilibrium_init_highres | -0.17 +/- 2.73 | -9.19e-03 +/- 1.46e-01 | 5.35e+00 +/- 1.3e-01 | 5.36e+00 +/- 7.3e-02 |
test_objective_compile_dshape_current | +1.20 +/- 4.37 | +5.07e-02 +/- 1.85e-01 | 4.28e+00 +/- 1.3e-01 | 4.23e+00 +/- 1.4e-01 |
test_objective_compute_dshape_current | +0.76 +/- 2.90 | +4.13e-05 +/- 1.58e-04 | 5.49e-03 +/- 7.3e-05 | 5.45e-03 +/- 1.4e-04 |
test_objective_jac_dshape_current | +0.67 +/- 7.72 | +2.89e-04 +/- 3.32e-03 | 4.34e-02 +/- 1.9e-03 | 4.31e-02 +/- 2.7e-03 |
test_perturb_2 | -0.00 +/- 2.04 | -3.26e-04 +/- 4.21e-01 | 2.07e+01 +/- 3.1e-01 | 2.07e+01 +/- 2.8e-01 |
test_proximal_jac_atf_with_eq_update | -1.31 +/- 1.07 | -2.26e-01 +/- 1.84e-01 | 1.71e+01 +/- 8.4e-02 | 1.73e+01 +/- 1.6e-01 |
test_proximal_freeb_jac | +0.36 +/- 4.29 | +2.55e-02 +/- 3.07e-01 | 7.19e+00 +/- 3.0e-01 | 7.16e+00 +/- 4.6e-02 |
test_solve_fixed_iter_compiled | +0.22 +/- 0.51 | +4.75e-02 +/- 1.09e-01 | 2.13e+01 +/- 9.9e-02 | 2.12e+01 +/- 4.4e-02 |
test_LinearConstraintProjection_build | +0.06 +/- 3.45 | +6.69e-03 +/- 3.94e-01 | 1.14e+01 +/- 2.9e-01 | 1.14e+01 +/- 2.6e-01 |
test_objective_compute_ripple_spline | -0.14 +/- 3.43 | -5.03e-04 +/- 1.20e-02 | 3.49e-01 +/- 5.8e-03 | 3.49e-01 +/- 1.0e-02 |
test_objective_grad_ripple_spline | +1.83 +/- 2.46 | +2.60e-02 +/- 3.51e-02 | 1.45e+00 +/- 2.0e-02 | 1.42e+00 +/- 2.9e-02 | |
@dpanici |
This should solve the indexing, np.testing.assert_allclose(
eq.Ra_n[len(eq.Ra_n) // 2 : len(eq.Ra_n) // 2 + 2], na.rc, atol=1e-10
)
np.testing.assert_allclose(
eq.Za_n[len(eq.Za_n) // 2 - 2 : len(eq.Za_n) // 2], na.zs, atol=1e-10
) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1593 +/- ##
=======================================
Coverage 95.69% 95.69%
=======================================
Files 101 101
Lines 26348 26348
=======================================
Hits 25215 25215
Misses 1133 1133
|
when only
sym
is passed intochange_resolution
, the underlying basissym
was not being correctly updated, which resulted in some bugs when dealing with asymmetric equilibria.Resolves #1586