| 479 | |
| 480 | |
| 481 | bool 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 | // ************************************************************************* // |
nothing calls this directly
no test coverage detected