facebookresearch / fmmax

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

Fix broadcasting for vector field source #96

Closed mfschubert closed 6 months ago

mfschubert commented 6 months ago

Previously, simulations involving anisotropic eigensolve and batch dimensions (e.g. multiple wavelengths) would have failed. This fixes the issue.

I also modified the sources module, allowing the amplitudes_for_fields function to be used without Brillouin zone integration.