Skip to content

Commit

Permalink
fix(story): Ensure that missing adjacencies don't give cryptic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed May 14, 2024
1 parent ab63092 commit c08c5e6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dragonfly/story.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,9 +1306,14 @@ def check_missing_adjacencies(self, raise_exception=True, detailed=False):
for bc, w_par in zip(room._boundary_conditions, room._window_parameters):
if isinstance(bc, Surface):
bc_objs = bc.boundary_condition_objects
bc_ind = int(bc_objs[0].split('..Face')[-1]) - 1
srf_bc_dict[(bc_objs[-1], bc_ind)] = \
(room.identifier, bc_objs[0], w_par, room)
try:
bc_ind = int(bc_objs[0].split('..Face')[-1]) - 1
srf_bc_dict[(bc_objs[-1], bc_ind)] = \
(room.identifier, bc_objs[0], w_par, room)
except ValueError: # Surface BC not following dragonfly convention
# this will be reported as a missing adjacency later
srf_bc_dict[(bc_objs[-1], 10000)] = \
(room.identifier, bc_objs[0], w_par, room)
rid_map[room.identifier] = room.full_id
# check the adjacencies for all Surface boundary conditions
msgs = []
Expand Down

0 comments on commit c08c5e6

Please sign in to comment.