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

Adjoint Optimization with Frequency Domain Solver #2851

Open
ScopeX-ASU opened this issue Jun 21, 2024 · 3 comments
Open

Adjoint Optimization with Frequency Domain Solver #2851

ScopeX-ASU opened this issue Jun 21, 2024 · 3 comments

Comments

@ScopeX-ASU
Copy link

I noticed the adjoint optimization only supports sim.run(), which is FDTD simulation.
I was wondering whether I can use adjoint optimization with sim.solve_cw() for frequency-domain adjoint gradient calculation.
Is there any example of how to use meep for FDFD adjoint gradient calculation with solve_cw()?

@smartalecH
Copy link
Collaborator

The adjoint isn't actually a time-domain adjoint, it's a frequency-domain adjoint implemented with a time domain solver (via the rolling DFT operator).

So all of the optimization FOMs are specified in the frequency-domain too.

The advantage to this approach is you get the practicality of a frequency domain adjoint, with the scalability of a time-domain solver (best of both worlds).

You can read more about this hybrid approach we pioneered in our paper: https://doi.org/10.1364/OE.442074

@ScopeX-ASU
Copy link
Author

Thanks for your reply. Yes, the adjoint gradient calculation is based on frequency domain fields. I was wondering whether the forward simulation and adjoint simulation in meep can be FDFD(solve_cw), instead of FDTD+DFT_monitor. just like spins-b or angler. Currently I couldn’t figure out a way to calculate adjoint grad in meep with frequency domain solver for the two simulations. In my case, solve_cw run is much faster than FDTD run.

@smartalecH
Copy link
Collaborator

No that's not currently supported. But the operator for that is the same, so getting that to work is just a matter of "software engineering" to be compatible with the current pipeline.

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