flaport / fdtd

A 3D electromagnetic FDTD simulator written in Python with optional GPU support
https://fdtd.readthedocs.io
MIT License
455 stars 116 forks source link

Flat Plane Source #24

Closed CharlesDove closed 2 years ago

CharlesDove commented 2 years ago

Hi folks, thanks for the awesome fdtd package! I'm trying to get a flat PlaneSource, eg a flat plane on z=N, but I haven't found a way to do it. Using something like grid[:,:,5]=fdtd.AnisotropicObject(permittivity=permittivity) gives a diagonal plane. Is there a way to get a flat plane? Thanks!

flaport commented 2 years ago

Hey @CharlesDove , this is indeed a bug, thanks for noticing!

What I suspect is going on is that the PlaneSource is actually correctly created, but the grid.visualize function does not know how to visualize it. I'll try adding this to the visualization function`.

CharlesDove commented 2 years ago

That makes sense, thanks!