mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: if the face area is less than ROOTVSMALL then return vector::zero
This commit is contained in:
@ -118,13 +118,12 @@ void Foam::primitiveMesh::makeFaceCentresAndAreas
|
|||||||
sumAc += a*c;
|
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)
|
if (sumA < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
// Sum of area too small. No chance of reliably calculating
|
|
||||||
// centroid so fallback to average.
|
|
||||||
fCtrs[facei] = fCentre;
|
fCtrs[facei] = fCentre;
|
||||||
fAreas[facei] = 0.5*sumN;
|
fAreas[facei] = vector::zero;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user