Skip to content
Snippets Groups Projects
Commit e551bdf2 authored by mattijs's avatar mattijs
Browse files

ENH: polyMeshFilter: enhanced checking (for merged points, map < -1)

parent e9485ae9
Branches
Tags
No related merge requests found
......@@ -267,7 +267,11 @@ Foam::label Foam::polyMeshFilter::filterFacesLoop(const label nOriginalBadFaces)
newBadFaces = false;
forAll(mesh_.points(), pI)
{
if (isErrorPoint[origToCurrentPointMap[pI]])
if
(
origToCurrentPointMap[pI] >= 0
&& isErrorPoint[origToCurrentPointMap[pI]]
)
{
if (!newErrorPoint[pI])
{
......@@ -862,14 +866,22 @@ void Foam::polyMeshFilter::updateOldToNewPointMap
{
label oldPointI = origToCurrentPointMap[origPointI];
if (oldPointI < currToNew.size())
if (oldPointI != -1)
{
label newPointI = currToNew[oldPointI];
if (newPointI != -1)
if (newPointI >= 0)
{
origToCurrentPointMap[origPointI] = newPointI;
}
else if (newPointI == -1)
{
origToCurrentPointMap[origPointI] = -1;
}
else
{
origToCurrentPointMap[origPointI] = -newPointI-2;
}
}
}
}
......
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