Skip to content

Commit

Permalink
fix 1880 (#1884)
Browse files Browse the repository at this point in the history
  • Loading branch information
smartalecH authored Jan 5, 2022
1 parent 2e563e7 commit efe3b4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,20 +477,20 @@ def get_boundary_volumes(thickness, direction, side, cylindrical=False):
else:
raise ValueError("Invalid simulation dimensions")
for permutation in itertools.product(dims, [mp.Low, mp.High]):
if (permutation[0] == mp.X) and (permutation[1] == mp.Low):
if ((permutation[0] == mp.X) and (permutation[1] == mp.Low)) and (sim.dimensions == mp.CYLINDRICAL or sim.is_cylindrical):
continue
vol = get_boundary_volumes(boundary.thickness,*permutation)
ax = plot_volume(sim,ax,vol,output_plane,plotting_parameters=boundary_parameters)
# two sides are the same
elif boundary.side == mp.ALL:
for side in [mp.Low, mp.High]:
if (boundary.direction == mp.X) and (side == mp.Low):
if ((boundary.direction == mp.X) and (side == mp.Low)) and (sim.dimensions == mp.CYLINDRICAL or sim.is_cylindrical):
continue
vol = get_boundary_volumes(boundary.thickness,boundary.direction,side)
ax = plot_volume(sim,ax,vol,output_plane,plotting_parameters=boundary_parameters)
# only one side
else:
if (boundary.direction == mp.X) and (boundary.side == mp.Low):
if ((boundary.direction == mp.X) and (boundary.side == mp.Low)) and (sim.dimensions == mp.CYLINDRICAL or sim.is_cylindrical):
continue
vol = get_boundary_volumes(boundary.thickness,boundary.direction,boundary.side)
ax = plot_volume(sim,ax,vol,output_plane,plotting_parameters=boundary_parameters)
Expand Down

0 comments on commit efe3b4b

Please sign in to comment.