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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/docs/Python_User_Interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -4414,7 +4414,7 @@ def __init__(self,
medium2,
weights=None,
grid_type='U_DEFAULT',
do_averaging=True,
do_averaging=False,
beta=0,
eta=0.5,
damping=0):
Expand Down
2 changes: 1 addition & 1 deletion python/geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def __init__(self,
medium2,
weights=None,
grid_type="U_DEFAULT",
do_averaging=True,
do_averaging=False,
beta=0,
eta=0.5,
damping=0):
Expand Down
4 changes: 2 additions & 2 deletions python/tests/test_adjoint_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def test_adjoint_solver_DFT_fields(self):
adj_scale = (dp[None,:]@adjsol_grad).flatten()
fd_grad = Ez2_perturbed-Ez2_unperturbed
print("Directional derivative -- adjoint solver: {}, FD: {}".format(adj_scale,fd_grad))
tol = 0.04 if mp.is_single_precision() else 0.006
tol = 0.07 if mp.is_single_precision() else 0.006
self.assertClose(adj_scale,fd_grad,epsilon=tol)


Expand Down Expand Up @@ -477,7 +477,7 @@ def test_complex_fields(self):
adj_scale = (dp[None,:]@adjsol_grad).flatten()
fd_grad = Ez2_perturbed-Ez2_unperturbed
print("Directional derivative -- adjoint solver: {}, FD: {}".format(adj_scale,fd_grad))
tol = 0.012 if mp.is_single_precision() else 0.002
tol = 0.018 if mp.is_single_precision() else 0.002
self.assertClose(adj_scale,fd_grad,epsilon=tol)

def test_damping(self):
Expand Down