Unit test for adjoint solver involving multiple objective functions #2294
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.
Adds a missing unit test for the adjoint solver involving two separate objective functions for a test problem involving a waveguide mode converter: (1)$R$ and (2) $1-T$ , where $R$ is reflectance into the first-order mode of Port 1 and $T$ is transmittance into the second-order mode of Port 2.
The two adjoint simulations (one for each objective function) are set up to run serially but we could modify the setup to have them run in parallel using the
meep.divide_parallel_processes
feature which is described in Section 5 ("Computational parallelism") of the manuscript.Also fixes a small bug in the unit test added in #2271 in which the DFT monitor for the reflected fields and source were overlapping (they should be offset from one another).