Skip to content

Commit

Permalink
Box gradients much better
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerflex committed Aug 29, 2024
1 parent 1f976bc commit 66c8f0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_components/test_autograd.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

# whether to run numerical gradient tests, off by default because it runs real simulations
RUN_NUMERICAL = False
_NUMERICAL_COMBINATION = ("center_list", "mode")
_NUMERICAL_COMBINATION = ("size_element", "mode")

TEST_MODES = ("pipeline", "adjoint", "speed")
TEST_MODE = "speed" if TEST_POLYSLAB_SPEED else "pipeline"
Expand Down
2 changes: 1 addition & 1 deletion tidy3d/components/geometry/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,7 @@ def derivative_face(
if min_max_index == 0:
index_out, index_in = (0, num_cells_in - 1)
else:
index_out, index_in = (-1, -num_cells_in)
index_out, index_in = (-1, -num_cells_in - 1)
eps_xyz_inside = [eps.isel(**{dim_normal: index_in}) for eps in eps_xyz]
eps_xyz_outside = [eps.isel(**{dim_normal: index_out}) for eps in eps_xyz]

Expand Down

0 comments on commit 66c8f0b

Please sign in to comment.