Skip to content

Commit

Permalink
mesh.io.from_vertices_and_simplices: use new force_positive_orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed May 2, 2024
1 parent 287f4c1 commit 11db134
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions meshmode/mesh/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,10 @@ def from_vertices_and_simplices(

grp = make_group_from_vertices(vertices, simplices, order)

if fix_orientation:
if grp.dim != vertices.shape[0]:
raise ValueError("can only fix orientation of volume meshes")

from meshmode.mesh.processing import (
find_volume_mesh_element_group_orientation, flip_element_group)
orient = find_volume_mesh_element_group_orientation(vertices, grp)
grp = flip_element_group(vertices, grp, orient < 0)

return make_mesh(
vertices=vertices, groups=[grp],
is_conforming=True)
is_conforming=True,
force_positive_orientation=fix_orientation)

# }}}

Expand Down

0 comments on commit 11db134

Please sign in to comment.