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

use maximum rather than minimum decimation factor for DFT convergence criteria #1796

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Oct 21, 2021

The stop_when_dft_decayed convergence-criteria function introduced in #1740 uses a measurement interval (in number of timesteps) which is the maximum of two quantities: (1) the period of the largest frequency or (2) the smallest DFT decimation factor. However, (2) is incorrect because it could mean that not all the DFT fields have been updated before checking for convergence. The correct approach would be to use the largest DFT decimation factor.

@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2021

Codecov Report

Merging #1796 (3fff7ac) into master (849bf3d) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1796   +/-   ##
=======================================
  Coverage   73.90%   73.90%           
=======================================
  Files          17       17           
  Lines        4913     4913           
=======================================
  Hits         3631     3631           
  Misses       1282     1282           
Impacted Files Coverage Δ
python/simulation.py 76.73% <100.00%> (ø)

src/dft.cpp Outdated Show resolved Hide resolved
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
@stevengj stevengj merged commit 5c02ff2 into NanoComp:master Oct 27, 2021
@oskooi oskooi deleted the min_to_max_dftdec branch October 27, 2021 20:01
mawc2019 pushed a commit to mawc2019/meep that referenced this pull request Nov 3, 2021
… criteria (NanoComp#1796)

* use maximum rather than minimum decimation factor for DFT convergence criteria

* Update src/dft.cpp

Co-authored-by: Steven G. Johnson <stevenj@mit.edu>

Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
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