Skip to content

Commit

Permalink
fix _fit_volume_to_simulation_for_cylindrical for cylindrical coordin…
Browse files Browse the repository at this point in the history
…ates (#2208)
  • Loading branch information
mawc2019 authored Nov 17, 2022
1 parent d563416 commit 9ed6ec1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,9 @@ def __init__(
# on the settings in the Simulation instance. This method must be called on
# any user-defined Volume before passing it to meep via its `swigobj`.
def _fit_volume_to_simulation(self, vol: Volume) -> Volume:
if self.dimensions == mp.CYLINDRICAL:
self.dimensions = 2
self.is_cylindrical = True
return Volume(
vol.center,
vol.size,
Expand Down

0 comments on commit 9ed6ec1

Please sign in to comment.