Check for cell found.

This commit is contained in:
mattijs
2008-05-08 13:38:54 +01:00
parent dd3a79a3d8
commit 58d6da27b2

View File

@ -142,7 +142,7 @@ bool Foam::surfaceToCell::differingPointNormals
pointToNearest
);
if (pointTriI != cellTriI)
if (pointTriI != -1 && pointTriI != cellTriI)
{
scalar cosAngle = normals[pointTriI] & normals[cellTriI];