Skip to content

Change to CoilSetLinkingNumber - #2308

Open
singh-jaydeep wants to merge 2 commits into
masterfrom
js/linking-number-objective
Open

Change to CoilSetLinkingNumber#2308
singh-jaydeep wants to merge 2 commits into
masterfrom
js/linking-number-objective

Conversation

@singh-jaydeep

@singh-jaydeep singh-jaydeep commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

The current linking number objective returns, for each coil, the sum of Gauss integrals with respect to every coil. This includes a coil's integral with itself, which can be nonzero even if there is no linking. One of the changed tests has such a coilset. This PR removes those terms from the objective.

The stage 2 notebook uses this objective, so I can rerun it and see if the results change.

@github-actions

Copy link
Copy Markdown
Contributor

Memory benchmark result

|               Test Name                |      %Δ      |    Master (MB)     |      PR (MB)       |    Δ (MB)    |    Time PR (s)     |  Time Master (s)   |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
  test_objective_jac_w7x                 |   -0.26 %    |     4.251e+03      |     4.239e+03      |    -11.05    |       30.68        |       28.10        |
  test_proximal_jac_w7x_with_eq_update   |    0.48 %    |     6.808e+03      |     6.840e+03      |    32.43     |       151.23       |       151.01       |
  test_proximal_freeb_jac                |    0.02 %    |     1.353e+04      |     1.354e+04      |     2.34     |       81.13        |       80.29        |
  test_proximal_freeb_jac_blocked        |   -0.22 %    |     7.895e+03      |     7.878e+03      |    -17.03    |       68.41        |       68.85        |
  test_proximal_freeb_jac_batched        |    0.08 %    |     7.888e+03      |     7.894e+03      |     5.94     |       68.37        |       68.32        |
  test_proximal_jac_ripple               |   -1.23 %    |     3.777e+03      |     3.730e+03      |    -46.55    |       53.49        |       53.89        |
  test_proximal_jac_ripple_bounce1d      |   -1.71 %    |     4.060e+03      |     3.990e+03      |    -69.32    |       67.16        |       67.63        |
  test_eq_solve                          |    0.16 %    |     1.829e+03      |     1.832e+03      |     2.91     |       51.99        |       51.88        |
  test_objective_quadratic_flux_jac      |    0.55 %    |     1.877e+03      |     1.887e+03      |    10.32     |       34.13        |       34.33        |

For the memory plots, go to the summary of Memory Benchmarks workflow and download the artifact.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.35%. Comparing base (187e98e) to head (97bac42).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2308   +/-   ##
=======================================
  Coverage   94.34%   94.35%           
=======================================
  Files         101      101           
  Lines       29042    29043    +1     
=======================================
+ Hits        27400    27403    +3     
+ Misses       1642     1640    -2     
Files with missing lines Coverage Δ
desc/coils.py 96.84% <ø> (ø)
desc/objectives/_coils.py 99.34% <100.00%> (+<0.01%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant