Commit eed875e1 authored by Henry Weller's avatar Henry Weller
Browse files

primitiveMeshEdges: Added support for edges with duplicate vertices

Patch contributed by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2301
parent bfaa9da9
......@@ -56,7 +56,14 @@ Foam::label Foam::primitiveMesh::getEdge
// Make new edge.
label edgeI = es.size();
pe[pointi].append(edgeI);
pe[nextPointi].append(edgeI);
if (nextPointi != pointi)
{
// Very occasionally (e.g. blockMesh) a face can have duplicate
// vertices. Make sure we register pointEdges only once.
pe[nextPointi].append(edgeI);
}
if (pointi < nextPointi)
{
es.append(edge(pointi, nextPointi));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment