-
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
Allow QuadraticFlux
etc. to take multiple MagneticField
objects
#1205
Draft
ddudt
wants to merge
13
commits into
master
Choose a base branch
from
dd/sum-fields
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ddudt
added
objectives
Adding or improving objective functions
coil
stuff relating to coils and coil optimization
EZ-review
labels
Aug 19, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1205 +/- ##
=======================================
Coverage 95.42% 95.42%
=======================================
Files 89 89
Lines 22434 22434
=======================================
+ Hits 21407 21408 +1
+ Misses 1027 1026 -1
|
| benchmark_name | dt(%) | dt(s) | t_new(s) | t_old(s) |
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
test_build_transform_fft_lowres | -0.81 +/- 7.27 | -4.42e-03 +/- 3.97e-02 | 5.42e-01 +/- 3.6e-02 | 5.46e-01 +/- 1.7e-02 |
test_build_transform_fft_midres | -2.60 +/- 3.37 | -1.65e-02 +/- 2.14e-02 | 6.17e-01 +/- 1.3e-02 | 6.34e-01 +/- 1.7e-02 |
test_build_transform_fft_highres | -2.03 +/- 2.81 | -2.10e-02 +/- 2.91e-02 | 1.01e+00 +/- 2.3e-02 | 1.03e+00 +/- 1.8e-02 |
test_equilibrium_init_lowres | -0.10 +/- 4.94 | -4.02e-03 +/- 1.98e-01 | 4.00e+00 +/- 1.3e-01 | 4.00e+00 +/- 1.5e-01 |
test_equilibrium_init_medres | +0.14 +/- 1.46 | +6.34e-03 +/- 6.54e-02 | 4.49e+00 +/- 5.6e-02 | 4.49e+00 +/- 3.3e-02 |
test_equilibrium_init_highres | -0.36 +/- 2.57 | -2.16e-02 +/- 1.52e-01 | 5.90e+00 +/- 1.3e-01 | 5.92e+00 +/- 7.2e-02 |
test_objective_compile_dshape_current | +0.31 +/- 0.82 | +1.21e-02 +/- 3.23e-02 | 3.93e+00 +/- 2.7e-02 | 3.92e+00 +/- 1.7e-02 |
test_objective_compile_atf | -0.15 +/- 1.09 | -1.20e-02 +/- 8.73e-02 | 8.02e+00 +/- 7.0e-02 | 8.03e+00 +/- 5.2e-02 |
test_objective_compute_dshape_current | -0.93 +/- 2.50 | -3.32e-05 +/- 8.93e-05 | 3.53e-03 +/- 5.0e-05 | 3.56e-03 +/- 7.4e-05 |
test_objective_compute_atf | -0.64 +/- 2.93 | -6.79e-05 +/- 3.11e-04 | 1.05e-02 +/- 2.4e-04 | 1.06e-02 +/- 2.0e-04 |
test_objective_jac_dshape_current | +0.01 +/- 8.15 | +5.94e-06 +/- 3.37e-03 | 4.14e-02 +/- 2.6e-03 | 4.14e-02 +/- 2.2e-03 |
test_objective_jac_atf | +2.28 +/- 2.48 | +4.37e-02 +/- 4.74e-02 | 1.96e+00 +/- 1.4e-02 | 1.91e+00 +/- 4.5e-02 |
test_perturb_1 | -0.48 +/- 1.83 | -6.22e-02 +/- 2.38e-01 | 1.29e+01 +/- 1.6e-01 | 1.30e+01 +/- 1.8e-01 |
test_perturb_2 | -0.75 +/- 0.84 | -1.37e-01 +/- 1.52e-01 | 1.81e+01 +/- 1.4e-01 | 1.82e+01 +/- 7.0e-02 |
test_proximal_jac_atf | -0.33 +/- 1.06 | -2.76e-02 +/- 8.74e-02 | 8.23e+00 +/- 3.8e-02 | 8.26e+00 +/- 7.9e-02 |
test_proximal_freeb_compute | -1.24 +/- 0.90 | -2.28e-03 +/- 1.65e-03 | 1.82e-01 +/- 9.0e-04 | 1.84e-01 +/- 1.4e-03 |
test_proximal_freeb_jac | +0.21 +/- 1.43 | +1.54e-02 +/- 1.08e-01 | 7.55e+00 +/- 7.3e-02 | 7.53e+00 +/- 8.0e-02 |
test_solve_fixed_iter | -1.11 +/- 60.18 | -5.71e-02 +/- 3.09e+00 | 5.08e+00 +/- 2.2e+00 | 5.13e+00 +/- 2.2e+00 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
coil
stuff relating to coils and coil optimization
easy
Short and simple to code or review
objectives
Adding or improving objective functions
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1164
This allows for optimization with multiple different types of magnetic fields in combination; for example, a
MixedCoilSet
, aFourierCurrentPotentialField
, and aVerticalMagneticField
. Objectives likeQuadraticFlux
need to know about the total magnetic field from all of these sources, and you could combine them all in aSumMagneticField
to make that work. However, that then breaks the logic of objectives that expect a particular type of magnetic field, such as the coil objectives. Rather than editing the logic of all other objectives to work with aSumMagneticField
, this PR edits the logic ofQuadraticFlux
to take a list of fields and internally combines them into aSumMagneticField
to get the total field.TODO: