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

"Planewave Sources Extending into PML" not possible with meep version 1.23.0 #2043

Closed
linaku94 opened this issue Apr 14, 2022 · 2 comments · Fixed by #2044
Closed

"Planewave Sources Extending into PML" not possible with meep version 1.23.0 #2043

linaku94 opened this issue Apr 14, 2022 · 2 comments · Fixed by #2044

Comments

@linaku94
Copy link

I want to create a plane-wave source extending into a PML-Layer. Therefore, I tried to reproduce this tutorial/example

I used the exact same code:

import meep as mp
import matplotlib.pyplot as plt

pml_layers = [mp.PML(thickness=1)]
cell_size = mp.Vector3(10,10)

sources = [mp.Source(mp.ContinuousSource(1,is_integrated=True),
                     center=mp.Vector3(-4),
                     size=mp.Vector3(y=10),
                     component=mp.Ez)]

sim = mp.Simulation(resolution=20,
                    cell_size=cell_size,
                    boundary_layers=pml_layers,
                    sources=sources,
                    k_point=mp.Vector3())

sim.run(until=30)

sim.plot2D(fields=mp.Ez)
plt.show()

However, the is_integrated option doesn't change anything, I never get an actual plane-wave source. My meep version is 1.23.0, but the same issue appears with 1.22. With version 1.21 it works.

resulting figure, is_integrated = True with meep 1.23.0
Figure_1

@stevengj
Copy link
Collaborator

stevengj commented Apr 14, 2022

Thanks for the bug report! git bisect says that the problem is due to ce4d151 (#1829) by @oskooi

It looks like that PR added some is_integrated=False defaults to subclasses for documentation purposes, but forgot to pass the user's value to the superclass constructor.

@stevengj
Copy link
Collaborator

Should be fixed now on the master branch.

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

Successfully merging a pull request may close this issue.

2 participants