diff --git a/components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp b/components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp index c673153a41..59a8a2c167 100644 --- a/components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp +++ b/components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp @@ -110,10 +110,12 @@ void SimplicialEmbedding::regularize_tags(bool generate_simplicial_embedding) if (m_mesh.has_attribute("vertices", PrimitiveType::Vertex)) { const auto pos_handle = m_mesh.get_attribute_handle("vertices", PrimitiveType::Vertex); - SimplexInversionInvariant inv(pos_handle.mesh(), pos_handle.as()); + if (pos_handle.dimension() == m_mesh.top_cell_dimension() - 1) { + SimplexInversionInvariant inv(pos_handle.mesh(), pos_handle.as()); - if (!inv.after({}, m_mesh.get_all(m_mesh.top_simplex_type()))) { - logger().error("Mesh is not inversion free BEFORE simplicial embedding!"); + if (!inv.after({}, m_mesh.get_all(m_mesh.top_simplex_type()))) { + logger().error("Mesh is not inversion free BEFORE simplicial embedding!"); + } } } @@ -295,8 +297,12 @@ void SimplicialEmbedding::regularize_tags(bool generate_simplicial_embedding) m_mesh.get_attribute_handle("vertices", PrimitiveType::Vertex); SimplexInversionInvariant inv(pos_handle.mesh(), pos_handle.as()); - if (!inv.after({}, m_mesh.get_all(m_mesh.top_simplex_type()))) { - logger().error("Mesh is not inversion free after simplicial embedding!"); + if (pos_handle.dimension() == m_mesh.top_cell_dimension() - 1) { + SimplexInversionInvariant inv(pos_handle.mesh(), pos_handle.as()); + + if (!inv.after({}, m_mesh.get_all(m_mesh.top_simplex_type()))) { + logger().error("Mesh is not inversion free after simplicial embedding!"); + } } } }