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