Skip to content

Commit

Permalink
[geom] Improved mesh building warning
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Apr 25, 2024
1 parent 782e3a7 commit 4fa4379
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion phi/geom/_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ def build_faces_2d(vertices: Tensor,
for v1, v2 in pair_list:
poly_idx = poly_by_face.get((v1, v2), None)
if poly_idx is None:
poly_idx = poly_by_face[(v2, v1)]
poly_idx = poly_by_face.get((v2, v1), None)
assert poly_idx is not None, f"Boundary edge between vertices {v1} and {v2} is not connected to any cell! Either add a connected polygon or remove it from the boundary '{boundary_name}'"
del poly_by_face[(v2, v1)]
b_points1.append(v2)
b_points2.append(v1)
Expand Down

0 comments on commit 4fa4379

Please sign in to comment.