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

specify default no smoothing for MaterialGrid constructor #1903

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Jan 13, 2022

#1780 added support for subpixel smoothing of the adjoint gradient and also set smoothing as the default for the MaterialGrid. (#1886 fixed a bug to permit no smoothing via do_averaging=False of the MaterialGrid.) Since subpixel smoothing of the adjoint gradients is currently an experimental feature which can, under certain circumstances, significantly slow down the runtime performance of the get_gradient function of the adjoint-solver module (compared to no smoothing), it is probably better to use a default of no smoothing for the MaterialGrid. The default setting can be changed once this feature is more mature and the performance is better tested (via e.g. #1855).

(Since forward simulations that do not involve computing the adjoint gradient do benefit from the improved accuracy of subpixel smoothing of the MaterialGrid without a noticeable degradation in runtime performance, it could be useful to have a separate flag for subpixel smoothing in the adjoint solver. This way, the do_averaging property of the MaterialGrid can still be True by default and overwritten to False by the adjoint solver.)

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2022

Codecov Report

Merging #1903 (623a2d4) into master (accaf4f) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1903      +/-   ##
==========================================
+ Coverage   73.13%   73.15%   +0.02%     
==========================================
  Files          17       17              
  Lines        4924     4924              
==========================================
+ Hits         3601     3602       +1     
+ Misses       1323     1322       -1     
Impacted Files Coverage Δ
python/geom.py 93.87% <ø> (ø)
python/simulation.py 76.85% <0.00%> (+0.04%) ⬆️

@oskooi oskooi merged commit 8f3d7ba into NanoComp:master Jan 13, 2022
@oskooi oskooi deleted the matgrid_subpix_disable branch January 13, 2022 15:45
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.

2 participants