Skip to content

Commit afb4046

Browse files
committed
Fix small error in doping computation
1 parent 713dda7 commit afb4046

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tidy3d/components/tcad/doping.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ def _get_indices_in_box(self, coords: dict, meshgrid: bool = True):
4646
normal_axis = dim
4747
# normal_position = coords[var_name][0]
4848

49+
if all(len(coords[var_name]) == 1 for var_name in "xyz"):
50+
# if all coordinates have 1 point, we don't assume 2D unless the box itself is.
51+
normal_axis = None
52+
4953
# if provided coordinates are 3D, check if box is 2D
5054
if normal_axis is None:
5155
normal_axis = self._normal_dim()

0 commit comments

Comments
 (0)