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

Function getEdgeFaces

src/meshTools/meshTools/meshTools.C:457–496  ·  view source on GitHub ↗

Get the two faces on celli using edgeI.

Source from the content-addressed store, hash-verified

455
456// Get the two faces on celli using edgeI.
457void 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

Callers 13

regionSide.CFile · 0.85
setRefinementFunction · 0.85
collectCutsFunction · 0.85
calcDualFunction · 0.85
regioniseFacesFunction · 0.85
cellLooper.CFile · 0.85
cutFunction · 0.85
cutFunction · 0.85
walkCellFunction · 0.85
directionInfo.CFile · 0.85
isCellFeatureEdgeFunction · 0.85
walkSuperFaceFunction · 0.85

Calls 4

faceOnCellFunction · 0.85
forAllFunction · 0.50
abortFunction · 0.50
edgesMethod · 0.45

Tested by

no test coverage detected