-
Notifications
You must be signed in to change notification settings - Fork 41
Implement from_input_file for Equilibrium, update docs with this info
#1327
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
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
from_input_file for Equilibrium, update docs with this info
| benchmark_name | dt(%) | dt(s) | t_new(s) | t_old(s) |
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
test_build_transform_fft_midres | +0.60 +/- 6.92 | +3.76e-03 +/- 4.31e-02 | 6.27e-01 +/- 2.7e-02 | 6.24e-01 +/- 3.4e-02 |
test_build_transform_fft_highres | -0.41 +/- 2.89 | -4.17e-03 +/- 2.97e-02 | 1.02e+00 +/- 1.9e-02 | 1.03e+00 +/- 2.3e-02 |
test_equilibrium_init_lowres | +0.60 +/- 2.23 | +2.45e-02 +/- 9.07e-02 | 4.10e+00 +/- 7.3e-02 | 4.07e+00 +/- 5.4e-02 |
test_objective_compile_atf | -0.48 +/- 3.89 | -3.88e-02 +/- 3.13e-01 | 8.00e+00 +/- 1.7e-01 | 8.04e+00 +/- 2.6e-01 |
test_objective_compute_atf | +1.03 +/- 3.73 | +1.10e-04 +/- 4.00e-04 | 1.08e-02 +/- 2.3e-04 | 1.07e-02 +/- 3.3e-04 |
test_objective_jac_atf | +1.80 +/- 2.88 | +3.43e-02 +/- 5.50e-02 | 1.94e+00 +/- 2.9e-02 | 1.91e+00 +/- 4.7e-02 |
test_perturb_1 | -0.98 +/- 1.93 | -1.30e-01 +/- 2.55e-01 | 1.31e+01 +/- 2.0e-01 | 1.32e+01 +/- 1.6e-01 |
test_proximal_jac_atf | -0.21 +/- 0.75 | -1.74e-02 +/- 6.10e-02 | 8.15e+00 +/- 2.7e-02 | 8.17e+00 +/- 5.5e-02 |
test_proximal_freeb_compute | +0.02 +/- 1.10 | +3.59e-05 +/- 2.01e-03 | 1.84e-01 +/- 1.3e-03 | 1.84e-01 +/- 1.6e-03 |
test_build_transform_fft_lowres | +1.91 +/- 5.49 | +9.86e-03 +/- 2.84e-02 | 5.27e-01 +/- 2.6e-02 | 5.18e-01 +/- 1.2e-02 |
test_equilibrium_init_medres | +0.55 +/- 1.07 | +2.28e-02 +/- 4.40e-02 | 4.13e+00 +/- 3.0e-02 | 4.11e+00 +/- 3.2e-02 |
test_equilibrium_init_highres | -0.51 +/- 0.99 | -2.80e-02 +/- 5.40e-02 | 5.44e+00 +/- 2.5e-02 | 5.47e+00 +/- 4.8e-02 |
test_objective_compile_dshape_current | +0.22 +/- 6.99 | +8.44e-03 +/- 2.67e-01 | 3.84e+00 +/- 1.9e-01 | 3.83e+00 +/- 1.9e-01 |
test_objective_compute_dshape_current | +0.91 +/- 2.10 | +3.29e-05 +/- 7.59e-05 | 3.64e-03 +/- 7.1e-05 | 3.61e-03 +/- 2.8e-05 |
test_objective_jac_dshape_current | +3.04 +/- 5.20 | +1.20e-03 +/- 2.04e-03 | 4.05e-02 +/- 1.4e-03 | 3.93e-02 +/- 1.5e-03 |
test_perturb_2 | +0.53 +/- 1.08 | +9.32e-02 +/- 1.90e-01 | 1.76e+01 +/- 1.4e-01 | 1.75e+01 +/- 1.3e-01 |
test_proximal_freeb_jac | +0.46 +/- 1.03 | +3.39e-02 +/- 7.65e-02 | 7.46e+00 +/- 3.6e-02 | 7.42e+00 +/- 6.7e-02 |
test_solve_fixed_iter | -1.41 +/- 58.99 | -7.06e-02 +/- 2.96e+00 | 4.94e+00 +/- 2.1e+00 | 5.01e+00 +/- 2.1e+00 | |
| inputs["bdry_ratio"] | ||
| ) | ||
| ) | ||
| inputs["surface"][:, 1:3] = inputs["surface"][:, 1:3].astype(int) |
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.
This is probably handled somewhere in the InputReader (and thus not related to this PR) but I couldn't find it at the first glance, do we ever check if the given l modes are all 0s? Even if the user gives nonzero values, they will probably be ignored but still, a warning or something could be good.
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.
They are not, I checked and inputs["surface"] has floats for the mode number parts of it. Probably we should handle in input reader, you're right
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.
equilibrium.utils.parse_surface ensures that the surface array either has all l==0 or all n==0:
DESC/desc/equilibrium/utils.py
Line 62 in f5abd60
| def parse_surface(surface, NFP=1, sym=True, spectral_indexing="ansi"): |
Co-authored-by: Yigit Gunsur Elmacioglu <102380275+YigitElma@users.noreply.github.com>
…ugh the class itself
Co-authored-by: Yigit Gunsur Elmacioglu <102380275+YigitElma@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1327 +/- ##
==========================================
- Coverage 95.53% 95.52% -0.01%
==========================================
Files 96 96
Lines 24010 24024 +14
==========================================
+ Hits 22937 22949 +12
- Misses 1073 1075 +2
|
|
Should make it no threshold by default |
…to dp/from_input_file
YigitElma
left a comment
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.
The non-zero l modes in the input file warning can be added in some other PR. Seems fine to me
resolves #1298