ENH: add face/triFace contains(edge) method (#3004)

STYLE: use contains() and reduce reliance on edgeDirection -1/+1 values
This commit is contained in:
Mark Olesen
2023-10-25 21:22:51 +02:00
parent b34793c392
commit 29e2718162
9 changed files with 53 additions and 23 deletions

View File

@ -1174,8 +1174,7 @@ Foam::label Foam::distributedTriSurfaceMesh::findOtherFace
{
if (facei != nearFacei)
{
int dir = surf[facei].edgeDirection(e);
if (dir != 0)
if (surf[facei].contains(e))
{
return facei;
}
@ -1211,7 +1210,7 @@ void Foam::distributedTriSurfaceMesh::calcFaceFaces
{
if (otherFacei != facei)
{
if (s[otherFacei].edgeDirection(e) != 0)
if (s[otherFacei].contains(e))
{
if (!nbrs.find(otherFacei))
{