[4/n][Adjoint Module] Launch a mode through a stratified stack into the simulation (and backprop) - #3284
Draft
smartalecH wants to merge 1 commit into
Draft
Conversation
incident_fields is the time reverse of spectrum: a Mode is specified where it is physically meaningful -- at the fiber facet, on the far side of the stack -- and carried back down to the monitor plane, where Meep can inject it. The scalar transfer function of a stratified medium is the same in both directions, so the same product of transmission and propagation phases applies. The result is purely in-going by construction, since it inverts decompose for a spectrum with no outgoing part. equivalent_sources then hands those fields to mp.get_equiv_sources, which already applies the equivalence principle and emits sources carrying amp_data. Because amp_data is differentiable, a beam injected this way backpropagates to its own waist, tilt and offset. from_volume builds a propagator without a monitor, which the injection path needs: a DFT monitor requires the field components to be allocated, and that does not happen until sources are added -- which is what is being built. Verified end to end: the injected field is 99.997% in-going, the radiated beam leaks 4e-3 in amplitude the wrong way (1.6e-5 in power), and the beam measured downstream is still 99.99% travelling the direction it was sent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.