| 930 | |
| 931 | |
| 932 | bool 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 | { |