ENH: if the face area is less than ROOTVSMALL then return vector::zero

This commit is contained in:
laurence
2012-12-11 17:05:03 +00:00
parent 3ad25a12d4
commit 3d49ababd4

View File

@ -118,13 +118,12 @@ void Foam::primitiveMesh::makeFaceCentresAndAreas
sumAc += a*c;
}
// This is to deal with zero-area faces. Mark very small faces
// to be detected in e.g., processorPolyPatch.
if (sumA < ROOTVSMALL)
{
// Sum of area too small. No chance of reliably calculating
// centroid so fallback to average.
fCtrs[facei] = fCentre;
fAreas[facei] = 0.5*sumN;
fAreas[facei] = vector::zero;
}
else
{