-
Notifications
You must be signed in to change notification settings - Fork 17
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 new option "Hsteps" to HysteresisDriver #138
Conversation
Allows configuration of tunable (non-symmetric) hysteresis loops.
for more information, see https://pre-commit.ci
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.
Apologies for the late reply. Thank you for adding the requested changes. I have left a few minor comments.
I have two further requests:
- The additional docstring in your initial proposal looked good and is currently missing. Please re-add the part that you deleted in this commit: 5775c75.
- We will need an additional test for the new functionality. Testing is done with the separate
micromagnetictests
package and the test should be added tomicromagnetictests/hysteresisdriver.py
.
for more information, see https://pre-commit.ci
Sorry for the late reply, had some other work to do. I've included all your suggested changes, seems all valid to me 👍. But I'm not quite sure how to handle your suggestion in #138 (comment). As far as I understood, there is already WIP in implementing this new way of accepting I've also included the docstring from the old version. |
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.
Mostly accepted, but not sure how to handle https://github.com/ubermag/oommfc/pull/138/files/142d1c163aaa565b0e33ce644e8018284f6ad448#r1323102185 without breaking functionality.
Iterable is too generic. Co-authored-by: Martin Lang <[email protected]>
Please try a pipeline running your currently defined unittests. All current tests regarding |
I'm now (after unittest failed) surprised why it worked in my case, as it is now clear to me why it cannot. 😂 For running with (Hmin, Hmax, n) as keywords, IMHO we have two options:
|
Thanks for clarifying (I was really surprised that it might have worked for you before). I'll think about the possible alternatives and come back to you (or propose an implementation directly). Not sure when I'll have time for this. I'll try to reply soon (maybe within the next few weeks or so). I would propose that you start adding a test in here: |
This functionality will be used in #138
Hi @newton-per-sqm apologies for the late reply. |
I will merge the new test in ubermag/micromagnetictests#46 once this PR is ready. |
Update local master to the latest ubermag master
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #138 +/- ##
==========================================
- Coverage 93.28% 92.70% -0.59%
==========================================
Files 26 26
Lines 1192 1192
==========================================
- Hits 1112 1105 -7
- Misses 80 87 +7 ☔ View full report in Codecov by Sentry. |
Hi @lang-m! Thanks for your work here. Unfortunately, it looks like the update mechanism for the
We could overcome this issue quickly by calling -> As commented below, I think this happens because the |
@samjrholt I would like to merge this before we merge #153 |
…mptions in micromagneticmodel
@newton-per-sqm We would like to include this new feature in the next release of Ubermag, which we plan for the second half of June. The implementation and testing are done (I will take care of any remaining test failures should there be any). For that we would need/want a few more things:
|
Allows configuration of tunable (non-symmetric) hysteresis loops. (According to our discussion in PR #137)
Short Example:
I've adjusted the kwargs check to not allow the definition of both options ( [Hmin, Hmax, n] AND Hsteps). But for compatibility, the old concept of defining symmetric hysteresis loops still works as expected.