-
Notifications
You must be signed in to change notification settings - Fork 43
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
broadband adjoint (2.5) #1192
Merged
Merged
broadband adjoint (2.5) #1192
Conversation
This file contains 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
tylerflex
force-pushed
the
tyler/adjoint/broadband2.5
branch
from
October 4, 2023 16:41
523f544
to
10761d1
Compare
weiliangjin2021
approved these changes
Oct 7, 2023
tylerflex
force-pushed
the
tyler/adjoint/broadband2.5
branch
3 times, most recently
from
October 10, 2023 14:11
45a4c4a
to
e7631ea
Compare
momchil-flex
approved these changes
Oct 10, 2023
tylerflex
force-pushed
the
tyler/adjoint/broadband2.5
branch
from
October 11, 2023 13:28
e7631ea
to
238570a
Compare
ok I just added the source thing, fixed up changelog, squashed, etc. I think this should be ready to go assuming tests all pass. Could I leave it to you to merge the core PR? maybe with this updated submodule commit? |
tylerflex
force-pushed
the
tyler/adjoint/broadband2.5
branch
from
October 11, 2023 13:32
238570a
to
6b66abf
Compare
tylerflex
force-pushed
the
tyler/adjoint/broadband2.5
branch
from
October 11, 2023 13:38
6b66abf
to
d241829
Compare
Backend tests pass, merging everything! |
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.
same as #1179 but rebased against 2.5, squashed, and polished up.
Note: works fine on version 2.4.2 but fails with version 2.5.0rc1 for some reason, looking into this.
Also note: there are two added tests (
_test_adjoint_broadband ...
) that should go in core.Summary of changes:
output_monitors
and also differentoutput_monitors
can have different frequencies.freqs_adjoint
corresponding to these monitors, which become thefreq0
s of our adjoint sources.JaxSimulation.fwidth_adjoint
, thefwidth
of the adjoint sources is chosen to be smaller than some factor (0.1) times the minimum difference between thefreqs_adjoint
. This was chosen empirically to be small enough to have low error, but not be too small. When this is set, a warning is displayed to the user outlining that anfwidth
was chosen automatically, which could lead to largerun_time
and some mitigation approaches for tightly packed frequencies.JaxSimulation.run_time_adjoint
, therun_time
of the adjointJaxSimulation
, will be some factor (100) divided by the adjointfwidth
. Again chosen empirically to avoid early shutoff in the adjoint sims, while not being too long.source_time
spectrum atfwidths_adjoint
. This is because we need to apply a different normalization frequency-by-frequency depending on thefreq0
andfwidth
of the adjoint sources, which may introduce amplitude or phase differences.Corresponding notebook changes: flexcompute-readthedocs/tidy3d-docs#296
I think that covers it, thanks in advance for the review!