facebookresearch / fmmax

Fourier modal method with Jax
MIT License
95 stars 9 forks source link

Ensure in-plane wavevector is real #121

Closed mfschubert closed 3 months ago

mfschubert commented 3 months ago

LGTM thanks for the test!

What are some of the implications for existing code that's been incorporating complex materials (and thus complex wavevectors)?

Prior to this fix, complex permittivity would sometimes have yielded an in-plane wavevector corresponding to a wave propagating in an incorrect direction, e.g. -theta when +theta is desired. It also could have led to the modes which carry power forwards being treated as backward-going, and vice versa.

Note that this issue only arises for non-normal incidence.