-
Notifications
You must be signed in to change notification settings - Fork 49
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
Updated CircularCoil class to alllow for dofs #377
Conversation
we would need unit tests that cover this new functionality. Also a broader question is: what about the other magnetic fields in this file (ToroidalField, PoloidalField, DipoleField, etc)? they don't have this added support. Not saying that we need to, but just something that I noticed. |
About unit tests, sure, I can try to do that, but you mean creating new tests for this part or running already existing tests? About you broader question: yes I agree, we can think of extending this to other magnetic field objects – one step at a time :) |
I tried writing unit tests in #379. I also added the output to plot the circular coil. That made me remember that this field is tied to a specific coil, but that coil is not a geometry object. So this coil will not work for any of the regular curve objectives. Perhaps we should have a CircularCoil curve object that gets its field from CircularCoilField. However, I'm not sure that should be in the scope of this pull request. |
…date Js/circularcoil dofs update
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #377 +/- ##
==========================================
- Coverage 91.55% 91.10% -0.46%
==========================================
Files 74 74
Lines 12911 12956 +45
==========================================
- Hits 11821 11803 -18
- Misses 1090 1153 +63
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
With no activity for a couple months, I think its about time to complete this pull request. I created a new issue for the discussion of further additions to magneticfieldclasses.py. |
Thanks for reviving this, indeed I think we should go ahead with this and then if necessary carry out further additions/improvements to the class. I have been testing it for a while and it looks good to me! Is it normal that the Linting CI tests fail? can one ignore that? |
…sts, this avoid errors when using load/save
sorry but I had forgotten to add this minor quick fix that avoids errors when using load/save functions. |
I have (with some help from Jason, thanks!) modified the class CircularCoil in order to define its attributes (r0, I, normal, etc.) as degrees of freedom so that the object can be used in optimization of circular coil fields. This should not prevent a nominal use of the class, namely without optimization.