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

Function calcLoopsAndAddressing

src/dynamicMesh/meshCut/cellCuts/cellCuts.C:2631–2678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2629
2630
2631void 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
2681void Foam::cellCuts::check() const

Callers 1

cellCuts.CFile · 0.85

Calls 7

meshFunction · 0.85
calcCellLoopsFunction · 0.85
setFromCellLoopsFunction · 0.85
forAllFunction · 0.50
abortFunction · 0.50
edgesMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected