mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: removePoints: correct number of points to be deleted in parallel
This commit is contained in:
@ -219,7 +219,7 @@ Foam::label Foam::removePoints::countPointUsage
|
|||||||
|
|
||||||
pointCanBeDeleted.setSize(mesh_.nPoints());
|
pointCanBeDeleted.setSize(mesh_.nPoints());
|
||||||
pointCanBeDeleted = false;
|
pointCanBeDeleted = false;
|
||||||
label nDeleted = 0;
|
//label nDeleted = 0;
|
||||||
|
|
||||||
forAll(edge0, pointI)
|
forAll(edge0, pointI)
|
||||||
{
|
{
|
||||||
@ -243,14 +243,14 @@ Foam::label Foam::removePoints::countPointUsage
|
|||||||
if ((e0Vec & e1Vec) > minCos)
|
if ((e0Vec & e1Vec) > minCos)
|
||||||
{
|
{
|
||||||
pointCanBeDeleted[pointI] = true;
|
pointCanBeDeleted[pointI] = true;
|
||||||
nDeleted++;
|
//nDeleted++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (edge0[pointI] == -1)
|
else if (edge0[pointI] == -1)
|
||||||
{
|
{
|
||||||
// point not used at all
|
// point not used at all
|
||||||
pointCanBeDeleted[pointI] = true;
|
pointCanBeDeleted[pointI] = true;
|
||||||
nDeleted++;
|
//nDeleted++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
edge0.clear();
|
edge0.clear();
|
||||||
@ -300,6 +300,15 @@ Foam::label Foam::removePoints::countPointUsage
|
|||||||
true // null value
|
true // null value
|
||||||
);
|
);
|
||||||
|
|
||||||
|
label nDeleted = 0;
|
||||||
|
forAll(pointCanBeDeleted, pointI)
|
||||||
|
{
|
||||||
|
if (pointCanBeDeleted[pointI])
|
||||||
|
{
|
||||||
|
nDeleted++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return returnReduce(nDeleted, sumOp<label>());
|
return returnReduce(nDeleted, sumOp<label>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user