| 2629 | |
| 2630 | |
| 2631 | void Foam::cellCuts::calcLoopsAndAddressing(const labelList& cutCells) |
| 2632 | { |
| 2633 | // Sanity check on weights |
| 2634 | forAll(edgeIsCut_, edgeI) |
| 2635 | { |
| 2636 | if (edgeIsCut_[edgeI]) |
| 2637 | { |
| 2638 | scalar weight = edgeWeight_[edgeI]; |
| 2639 | |
| 2640 | if (weight < 0 || weight > 1) |
| 2641 | { |
| 2642 | FatalErrorInFunction |
| 2643 | << "Weight out of range [0,1]. Edge " << edgeI |
| 2644 | << " verts:" << mesh().edges()[edgeI] |
| 2645 | << " weight:" << weight << abort(FatalError); |
| 2646 | } |
| 2647 | } |
| 2648 | else |
| 2649 | { |
| 2650 | // Weight not used. Set to illegal value to make any use fall over. |
| 2651 | edgeWeight_[edgeI] = -GREAT; |
| 2652 | } |
| 2653 | } |
| 2654 | |
| 2655 | |
| 2656 | // Calculate faces that split cells in two |
| 2657 | calcCellLoops(cutCells); |
| 2658 | |
| 2659 | if (debug & 2) |
| 2660 | { |
| 2661 | Pout<< "-- cellLoops --" << endl; |
| 2662 | forAll(cellLoops_, celli) |
| 2663 | { |
| 2664 | const labelList& loop = cellLoops_[celli]; |
| 2665 | |
| 2666 | if (loop.size()) |
| 2667 | { |
| 2668 | Pout<< "cell:" << celli << " "; |
| 2669 | writeCuts(Pout, loop, loopWeights(loop)); |
| 2670 | Pout<< endl; |
| 2671 | } |
| 2672 | } |
| 2673 | } |
| 2674 | |
| 2675 | // Redo basic cut information (pointIsCut, edgeIsCut, faceSplitCut) |
| 2676 | // using cellLoop only. |
| 2677 | setFromCellLoops(); |
| 2678 | } |
| 2679 | |
| 2680 | |
| 2681 | void Foam::cellCuts::check() const |
no test coverage detected