BUG: mantis #1389: foamyHexMesh: point insertion was not correctly setting the vertex count

This commit is contained in:
william
2014-09-08 12:33:32 +01:00
committed by Andrew Heather
parent b9a5d9c028
commit 2fdeb139dc

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -314,8 +314,6 @@ Foam::Map<Foam::label> Foam::DelaunayMesh<Triangulation>::rangeInsertWithInfo
Map<label> oldToNewIndex(points.size());
label maxIndex = -1;
for
(
typename vectorPairPointIndex::const_iterator p = points.begin();
@ -342,17 +340,14 @@ Foam::Map<Foam::label> Foam::DelaunayMesh<Triangulation>::rangeInsertWithInfo
}
else
{
const label oldIndex = vert.index();
hint->index() = getNewVertexIndex();
if (reIndex)
{
const label oldIndex = vert.index();
hint->index() = getNewVertexIndex();
oldToNewIndex.insert(oldIndex, hint->index());
}
else
{
hint->index() = vert.index();
maxIndex = max(maxIndex, vert.index());
}
hint->type() = vert.type();
hint->procIndex() = vert.procIndex();
hint->targetCellSize() = vert.targetCellSize();
@ -360,11 +355,6 @@ Foam::Map<Foam::label> Foam::DelaunayMesh<Triangulation>::rangeInsertWithInfo
}
}
if (!reIndex)
{
vertexCount_ = maxIndex + 1;
}
return oldToNewIndex;
}