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

scaling factor for eigenmode adjoint source #2074

Closed
MarkMa1990 opened this issue May 16, 2022 · 1 comment
Closed

scaling factor for eigenmode adjoint source #2074

MarkMa1990 opened this issue May 16, 2022 · 1 comment

Comments

@MarkMa1990
Copy link

Hi,

I just tested the code "https://nbviewer.org/github/NanoComp/meep/blob/master/python/examples/adjoint_optimization/01-Introduction.ipynb", and for version 1.18.0, the gradients from adjoin method and finite difference match, for version 1.22.0, it requires 4 times extra scale to make the gradient match.

image

at meep/python/objective.py, line 99, the scale should be "scale *= 8" instead of "scale *= 2".

Can I ask where are these scale factor coming from? because of field FFT?

left figure, version 1.18.0, right, 1.22.0.

@smartalecH
Copy link
Collaborator

See #1984.

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

No branches or pull requests

2 participants