CornerLink
Count the vertices whose triangles do not form one fan.
In the namespace mesh::topology. Declared in src/libs/libmesh/mesh/topology/VertexFans.hpp.
Detailed description
corners holds three vertex keys per triangle: vertex indices, or any other key that names one point, such as the position ids of a triangle soup. A triangle with two equal keys is skipped.
A vertex is pinched when its triangles fall into more than one group, two triangles being in one group when they share an edge at the vertex. The test runs on the vertex's link: the edge opposite the vertex in each of its triangles. The triangles form one fan, open or closed, exactly when their link edges form one connected graph. Two closed surfaces that touch at one vertex give that vertex a link of two cycles. Every edge still has two triangles there, so an edge count does not see the pinch, and HalfedgeMesh::isManifold walks one ring per vertex and does not see it either (construct-field-defects §CFD-D-10 item 6, the owner's yes to question 7).
Runs in O(n) for n triangles with dense keys, and O(n log n) for sparse ones.
Returns the number of pinched vertices.