MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / isFeatureVertex

Function isFeatureVertex

src/meshTools/cellFeatures/cellFeatures.C:481–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479
480
481bool Foam::cellFeatures::isFeatureVertex(const label facei, const label vertI)
482 const
483{
484 if
485 (
486 (facei < 0)
487 || (facei >= mesh_.nFaces())
488 || (vertI < 0)
489 || (vertI >= mesh_.nPoints())
490 )
491 {
492 FatalErrorInFunction
493 << "Illegal face " << facei << " or vertex " << vertI
494 << abort(FatalError);
495 }
496
497 const labelList& pEdges = mesh_.pointEdges()[vertI];
498
499 label edge0 = -1;
500 label edge1 = -1;
501
502 forAll(pEdges, pEdgeI)
503 {
504 label edgeI = pEdges[pEdgeI];
505
506 if (meshTools::edgeOnFace(mesh_, facei, edgeI))
507 {
508 if (edge0 == -1)
509 {
510 edge0 = edgeI;
511 }
512 else
513 {
514 edge1 = edgeI;
515
516 // Found the two edges.
517 break;
518 }
519 }
520 }
521
522 if (edge1 == -1)
523 {
524 FatalErrorInFunction
525 << "Did not find two edges sharing vertex " << vertI
526 << " on face " << facei << " vertices:" << mesh_.faces()[facei]
527 << abort(FatalError);
528 }
529
530 return isFeaturePoint(edge0, edge1);
531}
532
533
534// ************************************************************************* //

Callers

nothing calls this directly

Calls 7

edgeOnFaceFunction · 0.85
isFeaturePointFunction · 0.70
abortFunction · 0.50
forAllFunction · 0.50
nFacesMethod · 0.45
nPointsMethod · 0.45
facesMethod · 0.45

Tested by

no test coverage detected