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

Function crossEdge

src/dynamicMesh/meshCut/cellCuts/cellCuts.C:763–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761
762
763bool Foam::cellCuts::crossEdge
764(
765 const label celli,
766 const label startCut,
767 const label facei,
768 const label otherCut,
769
770 label& nVisited,
771 labelList& visited
772) const
773{
774 // Cross edge to other face
775 label edgeI = getEdge(otherCut);
776
777 label otherFacei = meshTools::otherFace(mesh(), celli, facei, edgeI);
778
779 // Store old state
780 label oldNVisited = nVisited;
781
782 // Recurse to otherCut
783 bool foundLoop =
784 walkCell
785 (
786 celli,
787 startCut,
788 otherFacei,
789 otherCut,
790 nVisited,
791 visited
792 );
793
794 if (foundLoop)
795 {
796 return true;
797 }
798 else
799 {
800 // No success. Restore state (i.e. backtrack)
801 nVisited = oldNVisited;
802
803 return false;
804 }
805}
806
807
808bool Foam::cellCuts::addCut

Callers 1

walkCellFunction · 0.85

Calls 2

meshFunction · 0.85
walkCellFunction · 0.70

Tested by

no test coverage detected