Ensure CoilCurvature and CoilTorsion are resolution independent - #2302
Conversation
Memory benchmark result| Test Name | %Δ | Master (MB) | PR (MB) | Δ (MB) | Time PR (s) | Time Master (s) |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
test_objective_jac_w7x | 0.07 % | 4.239e+03 | 4.242e+03 | 2.98 | 30.13 | 28.51 |
test_proximal_jac_w7x_with_eq_update | -0.29 % | 6.875e+03 | 6.854e+03 | -20.26 | 152.79 | 153.54 |
test_proximal_freeb_jac | 0.13 % | 1.352e+04 | 1.354e+04 | 17.18 | 81.77 | 80.84 |
test_proximal_freeb_jac_blocked | 0.69 % | 7.836e+03 | 7.890e+03 | 54.03 | 69.04 | 69.85 |
test_proximal_freeb_jac_batched | 0.19 % | 7.857e+03 | 7.871e+03 | 14.68 | 68.48 | 69.02 |
test_proximal_jac_ripple | -0.99 % | 3.787e+03 | 3.750e+03 | -37.32 | 53.80 | 54.63 |
test_proximal_jac_ripple_bounce1d | 0.72 % | 3.757e+02 | 3.784e+02 | 2.71 | 3.48 | 3.47 |
test_eq_solve | 0.88 % | 1.816e+03 | 1.832e+03 | 16.01 | 52.37 | 51.69 |
test_objective_quadratic_flux_jac | 0.63 % | 1.887e+03 | 1.899e+03 | 11.96 | 34.89 | 34.00 |For the memory plots, go to the summary of |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2302 +/- ##
=======================================
Coverage 94.35% 94.35%
=======================================
Files 101 101
Lines 29092 29092
=======================================
+ Hits 27450 27451 +1
+ Misses 1642 1641 -1
🚀 New features to boost your workflow:
|
|
Can you also rerun the coil optimization notebook? Just so that they are up to date with master in case any minor changes have occurred |
Co-authored-by: Yigit Gunsur Elmacioglu <102380275+YigitElma@users.noreply.github.com>
|
View / edit / reply to this conversation on ReviewNB YigitElma commented on 2026-09-03T19:52:21Z Line #64. LinkingCurrentConsistency(eq, coilset, eq_fixed=True, jac_chunk_size=5), Any specific reason for adding additional constraint? YigitElma commented on 2026-09-04T17:45:57Z ok ok, nevermind, I didn't see you removed that from objectives |
|
View / edit / reply to this conversation on ReviewNB YigitElma commented on 2026-09-03T19:52:22Z I guess new constraint and weight caused this, but still this is a weirdly small number. |
|
View / edit / reply to this conversation on ReviewNB YigitElma commented on 2026-09-03T19:52:23Z These are couple orders of magnitude higher compared to before. This optimization was never intended to be a proper one (I think it is here to show MixedCoilSet optimization only), so probably fine. |
YigitElma
left a comment
There was a problem hiding this comment.
Other than the additional constraint for mixed coilset optimization notebook seems to be very similar. Looks good to me. If you think the additional constraint is necessary I can approve.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
ok ok, nevermind, I didn't see you removed that from objectives View entire conversation on ReviewNB |
|
View / edit / reply to this conversation on ReviewNB dpanici commented on 2026-09-10T19:17:03Z Line #13. "coil curvature": 185, # 750/np.sqrt(101/(2*np.pi)), I appreciate the comment here for review sake but we can remove this, no one will remember the old weight anyways |
dpanici
left a comment
There was a problem hiding this comment.
I think notebook chnages are ~ok. Coil opt is sensitive to small things changing and we aren't going for state of the art results in the notebook.
I do want that comment in the notebook next to the weight noting the old weight removed as it is unneeded, but other than that I'll approve once its done
Resolves #2301 by replacing
quad_weightswith their square roots for these objectives. Also strengthens the resolution independence test for coil objectives.