Get the two faces on celli using edgeI.
| 455 | |
| 456 | // Get the two faces on celli using edgeI. |
| 457 | void Foam::meshTools::getEdgeFaces |
| 458 | ( |
| 459 | const primitiveMesh& mesh, |
| 460 | const label celli, |
| 461 | const label edgeI, |
| 462 | label& face0, |
| 463 | label& face1 |
| 464 | ) |
| 465 | { |
| 466 | const labelList& eFaces = mesh.edgeFaces(edgeI); |
| 467 | |
| 468 | face0 = -1; |
| 469 | face1 = -1; |
| 470 | |
| 471 | forAll(eFaces, eFacei) |
| 472 | { |
| 473 | label facei = eFaces[eFacei]; |
| 474 | |
| 475 | if (faceOnCell(mesh, celli, facei)) |
| 476 | { |
| 477 | if (face0 == -1) |
| 478 | { |
| 479 | face0 = facei; |
| 480 | } |
| 481 | else |
| 482 | { |
| 483 | face1 = facei; |
| 484 | |
| 485 | return; |
| 486 | } |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | if ((face0 == -1) || (face1 == -1)) |
| 491 | { |
| 492 | FatalErrorInFunction |
| 493 | << "Can not find faces using edge " << mesh.edges()[edgeI] |
| 494 | << " on cell " << celli << abort(FatalError); |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | |
| 499 | // Return label of other edge connected to vertex |
no test coverage detected