BUG: polyMeshFilter: Correct logic

This commit is contained in:
laurence
2013-06-06 11:00:21 +01:00
parent 3e219bf9fc
commit 0b40592ac9

View File

@ -551,14 +551,14 @@ Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces)
labelList pointErrorCount(mesh_.nPoints(), 0); labelList pointErrorCount(mesh_.nPoints(), 0);
PackedBoolList newErrorPoint(mesh_.nPoints()); PackedBoolList newErrorPoint(mesh_.nPoints());
nBadFaces = edgeCollapser::checkMeshQuality edgeCollapser::checkMeshQuality
( (
mesh_, mesh_,
meshQualityCoeffDict_, meshQualityCoeffDict_,
newErrorPoint newErrorPoint
); );
bool newBadFaces = false; bool newBadFaces = true;
// Main loop // Main loop
// ~~~~~~~~~ // ~~~~~~~~~
@ -569,8 +569,8 @@ Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces)
while while
( (
nOuterIterations < maxIterations_ nOuterIterations < maxIterations_
&& nBadFaces > nOriginalBadFaces //&& nBadFaces > nOriginalBadFaces
&& !newBadFaces && newBadFaces
) )
{ {
Info<< nl << "Outer Iteration = " << nOuterIterations++ << nl Info<< nl << "Outer Iteration = " << nOuterIterations++ << nl
@ -919,7 +919,7 @@ Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces)
{ {
if (isErrorPoint[origToCurrentPointMap[pI]]) if (isErrorPoint[origToCurrentPointMap[pI]])
{ {
if (newErrorPoint[pI] == false) if (!newErrorPoint[pI])
{ {
newBadFaces = true; newBadFaces = true;
break; break;