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

Function walkCell

src/dynamicMesh/meshCut/cellCuts/cellCuts.C:932–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930
931
932bool Foam::cellCuts::walkCell
933(
934 const label celli,
935 const label startCut,
936 const label facei,
937 const label cut,
938
939 label& nVisited,
940 labelList& visited
941) const
942{
943 // Walk across face, storing cuts. Return last two cuts visited.
944 label lastCut = -1;
945 label beforeLastCut = -1;
946
947
948 if (debug & 2)
949 {
950 Pout<< "For cell:" << celli << " walked across face " << facei
951 << " from cut ";
952 labelList cuts(1, cut);
953 writeCuts(Pout, cuts, loopWeights(cuts));
954 Pout<< endl;
955 }
956
957 bool validWalk = walkFace
958 (
959 celli,
960 startCut,
961 facei,
962 cut,
963
964 lastCut,
965 beforeLastCut,
966 nVisited,
967 visited
968 );
969
970 if (!validWalk)
971 {
972 return false;
973 }
974
975 if (debug & 2)
976 {
977 Pout<< " to last cut ";
978 labelList cuts(1, lastCut);
979 writeCuts(Pout, cuts, loopWeights(cuts));
980 Pout<< endl;
981 }
982
983 // Check if starting point reached.
984 if (lastCut == startCut)
985 {
986 if (nVisited >= 3)
987 {
988 if (debug & 2)
989 {

Callers 3

walkPointFunction · 0.70
crossEdgeFunction · 0.70
calcCellLoopsFunction · 0.70

Calls 7

crossEdgeFunction · 0.85
walkPointFunction · 0.85
getEdgeFacesFunction · 0.85
meshFunction · 0.85
walkFaceFunction · 0.70
findEdgeFunction · 0.50
setSizeMethod · 0.45

Tested by

no test coverage detected