37template<
class FaceList,
class Po
intField>
39Foam::PrimitivePatch<FaceList, PointField>::calcEdgeLoops()
const
47 <<
"edge loops already calculated"
51 const edgeList& patchEdges = edges();
52 const label nIntEdges = nInternalEdges();
53 const label nBdryEdges = (patchEdges.size() - nIntEdges);
57 auto& edgeLoops = *edgeLoopsPtr_;
72 DynamicList<label> loop(nBdryEdges);
75 boolList unvisited(nBdryEdges,
true);
84 (bndEdgei = unvisited.find(
true)) >= 0;
88 label currentEdgei = (bndEdgei + nIntEdges);
91 label currentVerti = patchEdges[currentEdgei].first();
97 loop.push_back(currentVerti);
99 unvisited[currentEdgei - nIntEdges] =
false;
102 currentVerti = patchEdges[currentEdgei].otherVertex(currentVerti);
107 for (
const label edgei : patchPointEdges[currentVerti])
109 if (edgei >= nIntEdges && unvisited[edgei - nIntEdges])
112 currentEdgei = edgei;
117 while (currentEdgei != -1);
120 edgeLoops[numLoops] = loop;
125 edgeLoops.resize(numLoops);
131template<
class FaceList,
class Po
intField>
140 return *edgeLoopsPtr_;
const labelListList & edgeLoops() const
Return list of closed loops of boundary vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define DebugInFunction
Report an information message using Foam::Info.
List< edge > edgeList
List of edge.
List< labelList > labelListList
List of labelList.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
List< bool > boolList
A List of bools.
constexpr char nl
The newline '\n' character (0x0a).