Skip to content
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

automatically infer k direction for a 2d eigenmode source in a 2d simulation #1207

Closed
oskooi opened this issue May 2, 2020 · 0 comments · Fixed by #1208
Closed

automatically infer k direction for a 2d eigenmode source in a 2d simulation #1207

oskooi opened this issue May 2, 2020 · 0 comments · Fixed by #1208

Comments

@oskooi
Copy link
Collaborator

oskooi commented May 2, 2020

Currently, the example in Tutorial/Optical Forces involves two separate calculations: (1) using a fixed kz as the k_point, find the resonant mode of the coupled waveguide system using Harminv and (2) using the resonant frequency from (1), excite the waveguide mode using EigenModeSource via eig_match_freq=True to compute the Maxwell stress tensor. However, the first run is not actually required as @stevengj pointed out in #1204: an EigenModeSource with eig_match_freq=False and k_point set to kz will already compute the mode via MPB. However, rather than having to specify direction=mp.Z as part of the EigenModeSource declaration, Meep should automatically infer that the k direction is kz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant