| 806 | |
| 807 | |
| 808 | bool Foam::cellCuts::addCut |
| 809 | ( |
| 810 | const label celli, |
| 811 | const label cut, |
| 812 | label& nVisited, |
| 813 | labelList& visited |
| 814 | ) const |
| 815 | { |
| 816 | // Check for duplicate cuts. |
| 817 | if (findPartIndex(visited, nVisited, cut) != -1) |
| 818 | { |
| 819 | // Truncate (copy of) visited for ease of printing. |
| 820 | labelList truncVisited(visited); |
| 821 | truncVisited.setSize(nVisited); |
| 822 | |
| 823 | Pout<< "For cell " << celli << " : trying to add duplicate cut " << cut; |
| 824 | labelList cuts(1, cut); |
| 825 | writeCuts(Pout, cuts, loopWeights(cuts)); |
| 826 | |
| 827 | Pout<< " to path:"; |
| 828 | writeCuts(Pout, truncVisited, loopWeights(truncVisited)); |
| 829 | Pout<< endl; |
| 830 | |
| 831 | return false; |
| 832 | } |
| 833 | else |
| 834 | { |
| 835 | visited[nVisited++] = cut; |
| 836 | |
| 837 | return true; |
| 838 | } |
| 839 | } |
| 840 | |
| 841 | |
| 842 | bool Foam::cellCuts::walkFace |