| 1769 | |
| 1770 | |
| 1771 | bool Foam::cellCuts::validEdgeLoop |
| 1772 | ( |
| 1773 | const labelList& loop, |
| 1774 | const scalarField& loopWeights |
| 1775 | ) const |
| 1776 | { |
| 1777 | forAll(loop, fp) |
| 1778 | { |
| 1779 | label cut = loop[fp]; |
| 1780 | |
| 1781 | if (isEdge(cut)) |
| 1782 | { |
| 1783 | label edgeI = getEdge(cut); |
| 1784 | |
| 1785 | // Check: cut compatible only if can be snapped to existing one. |
| 1786 | if (edgeIsCut_[edgeI]) |
| 1787 | { |
| 1788 | scalar edgeLen = mesh().edges()[edgeI].mag(mesh().points()); |
| 1789 | |
| 1790 | if |
| 1791 | ( |
| 1792 | mag(loopWeights[fp] - edgeWeight_[edgeI]) |
| 1793 | > geomCellLooper::snapTol()*edgeLen |
| 1794 | ) |
| 1795 | { |
| 1796 | // Positions differ too much->would create two cuts. |
| 1797 | return false; |
| 1798 | } |
| 1799 | } |
| 1800 | } |
| 1801 | } |
| 1802 | return true; |
| 1803 | } |
| 1804 | |
| 1805 | |
| 1806 | Foam::label Foam::cellCuts::countFaceCuts |