mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: mantis #1389: foamyHexMesh: point insertion was not correctly setting the vertex count
This commit is contained in:
@ -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();
|
||||||
@ -342,17 +340,14 @@ Foam::Map<Foam::label> Foam::DelaunayMesh<Triangulation>::rangeInsertWithInfo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const label oldIndex = vert.index();
|
||||||
|
hint->index() = getNewVertexIndex();
|
||||||
|
|
||||||
if (reIndex)
|
if (reIndex)
|
||||||
{
|
{
|
||||||
const label oldIndex = vert.index();
|
|
||||||
hint->index() = getNewVertexIndex();
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user