-
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
Add field to things for boundary error objectives #935
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #935 +/- ##
==========================================
- Coverage 94.64% 94.63% -0.02%
==========================================
Files 86 86
Lines 21580 21586 +6
==========================================
+ Hits 20424 20427 +3
- Misses 1156 1159 +3
|
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.
Why were these changes necessary for this PR?
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.
SplineMagneticField
requires some custom behavior to work correctly as a pytree (required for it to be part of things
), and the previous method of defining a custom flattening method didn't consider all the extra attributes that get added with the Optimizable
base class. This refactors things a bit so that each class can use the default flattening method but also define specific attributes as static or dynamic without having to re-define the entire flattening/unflattening method (and then having to account for every attribute individually)
Note benchmarks are expected to fail due to updated argument name (renamed |
{Vacuum}BoundaryError.compute
field_fixed
option to objectives - currently this doesn't do anything since we usually can't precompute field qtys for a changing boundary, but could add special logic for certain field types later. Mainly this flag is for use in regular free boundary solve so you don't need to include explicit constraints targeting the field.Resolves #855
Should ideally merge #726 and #853 first so we have some sensible coil constraints before doing single stage stuff