Skip to content

Commit

Permalink
Only check for inversions if dimension can have inversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-zint committed Dec 19, 2024
1 parent dc7b408 commit f3c7e6d
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ void SimplicialEmbedding::regularize_tags(bool generate_simplicial_embedding)
if (m_mesh.has_attribute<double>("vertices", PrimitiveType::Vertex)) {
const auto pos_handle =
m_mesh.get_attribute_handle<double>("vertices", PrimitiveType::Vertex);
SimplexInversionInvariant<double> inv(pos_handle.mesh(), pos_handle.as<double>());
if (pos_handle.dimension() == m_mesh.top_cell_dimension() - 1) {
SimplexInversionInvariant<double> inv(pos_handle.mesh(), pos_handle.as<double>());

Check warning on line 114 in components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp

View check run for this annotation

Codecov / codecov/patch

components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp#L114

Added line #L114 was not covered by tests

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!");

Check warning on line 117 in components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp

View check run for this annotation

Codecov / codecov/patch

components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp#L117

Added line #L117 was not covered by tests
}
}

Check warning on line 119 in components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp

View check run for this annotation

Codecov / codecov/patch

components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp#L119

Added line #L119 was not covered by tests
}

Expand Down Expand Up @@ -295,8 +297,12 @@ void SimplicialEmbedding::regularize_tags(bool generate_simplicial_embedding)
m_mesh.get_attribute_handle<double>("vertices", PrimitiveType::Vertex);
SimplexInversionInvariant<double> inv(pos_handle.mesh(), pos_handle.as<double>());

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<double> inv(pos_handle.mesh(), pos_handle.as<double>());

Check warning on line 301 in components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp

View check run for this annotation

Codecov / codecov/patch

components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp#L301

Added line #L301 was not covered by tests

if (!inv.after({}, m_mesh.get_all(m_mesh.top_simplex_type()))) {
logger().error("Mesh is not inversion free after simplicial embedding!");

Check warning on line 304 in components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp

View check run for this annotation

Codecov / codecov/patch

components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp#L304

Added line #L304 was not covered by tests
}
}

Check warning on line 306 in components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp

View check run for this annotation

Codecov / codecov/patch

components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp#L306

Added line #L306 was not covered by tests
}
}
Expand Down

0 comments on commit f3c7e6d

Please sign in to comment.