Skip to content

Commit

Permalink
Fix AutoGrid to use full sim_size for computing dl_max
Browse files Browse the repository at this point in the history
  • Loading branch information
weiliangjin2021 committed Jan 16, 2025
1 parent 56e45b4 commit d9a3dca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tidy3d/components/grid/grid_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,15 +476,16 @@ def _make_coords_initial(

sim_cent = list(structures[0].geometry.center)
sim_size = list(structures[0].geometry.size)

# upper bound of grid step size based on total sim_size
dl_max = self._dl_max(sim_size)

for dim, sym in enumerate(symmetry):
if sym != 0:
sim_cent[dim] += sim_size[dim] / 4
sim_size[dim] /= 2
symmetry_domain = Box(center=sim_cent, size=sim_size)

# upper bound of grid step size
dl_max = self._dl_max(sim_size)

# New list of structures with symmetry applied
struct_list = [Structure(geometry=symmetry_domain, medium=structures[0].medium)]
for structure in structures[1:]:
Expand Down

0 comments on commit d9a3dca

Please sign in to comment.