-
Notifications
You must be signed in to change notification settings - Fork 631
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
removed amp_func argument to add_eig_src method for EigenModeSource #2381
Conversation
cc @hammy4815 |
Would this not prevent Lines 153 to 154 in d370f1a
However, the Lines 671 to 674 in d370f1a
Which is getting removed in this PR. But if it does get used somewhere else somehow, then I think this is fine as far as the new framework for |
Yeah this commit was just my quick and dirty solution for getting rid of the segfault in my example, something like this I think preserves the behavior in the case that an if isinstance(self.eig_band, mp.DiffractedPlanewave):
add_eig_src(self.amp_func, diffractedplanewave) if self.amp_func else add_eig_src(diffractedplanewave)
else:
add_eig_src(self.amp_func) if self.amp_func else add_eig_src() However I'm not sure an |
This will probably work, and maybe we pull it for now. However, I'm wondering if we should fix the bigger issue going on, i.e. why after the adjoint run is the eigenmode source set up incorrectly with regards to |
The user-specified Line 254 in d370f1a
|
The issue isn't with the |
] | ||
add_eig_src = functools.partial( | ||
sim.fields.add_eigenmode_source, *add_eig_src_args | ||
) | ||
|
||
if isinstance(self.eig_band, mp.DiffractedPlanewave): |
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.
We don't need to change this, so let's punt to the simpler PR.
(we can always re-open if I'm wrong) |
Reference issue: #2379 (comment)