NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.16k stars 594 forks source link

Add `eig_vol` argument to `EigenModeSource` class constructor #2767

Closed oskooi closed 5 months ago

oskooi commented 5 months ago

Fixes #2755.

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9cc041e) 73.78% compared to head (62ea453) 73.79%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2767 +/- ## ======================================= Coverage 73.78% 73.79% ======================================= Files 18 18 Lines 5421 5423 +2 ======================================= + Hits 4000 4002 +2 Misses 1421 1421 ``` | [Files](https://app.codecov.io/gh/NanoComp/meep/pull/2767?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [python/source.py](https://app.codecov.io/gh/NanoComp/meep/pull/2767?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHl0aG9uL3NvdXJjZS5weQ==) | `94.08% <100.00%> (+0.03%)` | :arrow_up: |
oskooi commented 5 months ago

Note: I used this PR along with the one-line change in mpb.cpp in #2285 to verify the accuracy of the adjoint gradients for the EigenmodeCoefficient objective function using the 2d test involving a 1d binary grating described in #2054 (comment). After this PR and #2285 are merged, we may therefore add the 1d diffraction grating as a new unit test for the adjoint solver.

stevengj commented 5 months ago

LGTM.