Skip to content

Commit

Permalink
Fixed Mesh
Browse files Browse the repository at this point in the history
Now, a mesh can have repeated indices in its simplices. The conformity test was too strict.
  • Loading branch information
regislebrun committed Oct 13, 2023
1 parent b5209eb commit 2c7fb34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/Base/Geom/Mesh.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ void Mesh::checkValidity() const
if (simplex.getSize() != getDimension() + 1)
throw InvalidArgumentException(HERE) << "Error: mesh has dimension " << getDimension() << " but simplex #" << i << " has size" << simplex.getSize();

if (!simplex.check(getVerticesNumber()))
throw InvalidArgumentException(HERE) << "Error: mesh has " << getVerticesNumber() << " vertices but simplex #" << i << " refers to an unknown vertex";
if (*std::max_element(simplex.begin(), simplex.end()) >= getVerticesNumber())
throw InvalidArgumentException(HERE) << "Error: mesh has " << getVerticesNumber() << " vertices but simplex #" << i << " = " << simplex << " refers to an unknown vertex";
}
// Check that no ball can be included into the intersection of two simplices
// One it has been checked everything is ok
Expand Down

0 comments on commit 2c7fb34

Please sign in to comment.