diff --git a/tests/test_components/test_autograd.py b/tests/test_components/test_autograd.py index 38a2a28a1..fdcfb058f 100644 --- a/tests/test_components/test_autograd.py +++ b/tests/test_components/test_autograd.py @@ -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" diff --git a/tidy3d/components/geometry/base.py b/tidy3d/components/geometry/base.py index 28df913f1..009f0b8ed 100644 --- a/tidy3d/components/geometry/base.py +++ b/tidy3d/components/geometry/base.py @@ -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]