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

Function walkPoint

src/dynamicMesh/meshCut/cellCuts/cellCuts.C:708–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706
707
708bool Foam::cellCuts::walkPoint
709(
710 const label celli,
711 const label startCut,
712
713 const label exclude0,
714 const label exclude1,
715
716 const label otherCut,
717
718 label& nVisited,
719 labelList& visited
720) const
721{
722 label vertI = getVertex(otherCut);
723
724 const labelList& pFaces = mesh().pointFaces()[vertI];
725
726 forAll(pFaces, pFacei)
727 {
728 label otherFacei = pFaces[pFacei];
729
730 if
731 (
732 otherFacei != exclude0
733 && otherFacei != exclude1
734 && meshTools::faceOnCell(mesh(), celli, otherFacei)
735 )
736 {
737 label oldNVisited = nVisited;
738
739 bool foundLoop =
740 walkCell
741 (
742 celli,
743 startCut,
744 otherFacei,
745 otherCut,
746 nVisited,
747 visited
748 );
749
750 if (foundLoop)
751 {
752 return true;
753 }
754
755 // No success. Restore state and continue
756 nVisited = oldNVisited;
757 }
758 }
759 return false;
760}
761
762
763bool Foam::cellCuts::crossEdge

Callers 1

walkCellFunction · 0.85

Calls 4

meshFunction · 0.85
faceOnCellFunction · 0.85
walkCellFunction · 0.70
forAllFunction · 0.50

Tested by

no test coverage detected