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

Unit test for adjoint solver involving multiple objective functions #2294

Merged
merged 4 commits into from
Nov 3, 2022

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Oct 29, 2022

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).

@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2022

Codecov Report

Merging #2294 (b0c1f62) into master (5fa12b4) will increase coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2294      +/-   ##
==========================================
+ Coverage   73.23%   73.29%   +0.06%     
==========================================
  Files          17       17              
  Lines        4931     4931              
==========================================
+ Hits         3611     3614       +3     
+ Misses       1320     1317       -3     
Impacted Files Coverage Δ
python/adjoint/optimization_problem.py 59.48% <0.00%> (+1.53%) ⬆️

@stevengj stevengj merged commit 5b92d03 into NanoComp:master Nov 3, 2022
@oskooi oskooi deleted the adjsol_two_objfunc_test branch November 3, 2022 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants