33 template<
class>
class FaceList,
58 const labelList& pEdges = pointEdges[pointI];
62 label edgeI = pEdges[0];
64 label prevFaceI = edgeFaces[edgeI][0];
69 label nVisitedEdges = 0;
76 const labelList& eFaces = edgeFaces[edgeI];
78 if (eFaces.
size() != 2)
83 label faceI = eFaces[0];
84 if (faceI == prevFaceI)
90 const labelList& fEdges = faceEdges[faceI];
94 const label nextEdgeI = fEdges[feI];
95 const edge& nextEdge = edges[nextEdgeI];
100 && (nextEdge.
start() == pointI || nextEdge.
end() == pointI)
111 if (nVisitedEdges > nPointEdges)
113 WarningIn(
"Foam::PatchTools::sortedPointEdges()")
114 <<
"Unable to order pointEdges as the face connections " 115 <<
"are not circular" <<
nl 116 <<
" Original pointEdges = " << pEdges <<
nl 117 <<
" New pointEdges = " << newEdgeList
120 newEdgeList = pEdges;
125 }
while (edgeI != pEdges[0]);
127 if (newEdgeList.
size() == nPointEdges)
131 if (
findIndex(newEdgeList, pEdges[eI]) == -1)
133 WarningIn(
"Foam::PatchTools::sortedPointEdges()")
134 <<
"Cannot find all original edges in the new list" 136 <<
" Original pointEdges = " << pEdges <<
nl 137 <<
" New pointEdges = " << newEdgeList
140 newEdgeList = pEdges;
146 sortedPointEdges[pointI] = newEdgeList;
150 return sortedPointEdges;
void setCapacity(const label)
Alter the size of the underlying storage.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
const labelListList & edgeFaces() const
Return edge-face addressing.
void clear()
Clear the addressed list, i.e. set the size to zero.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void size(const label)
Override size to be inconsistent with allocated storage.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
static labelListList sortedPointEdges(const PrimitivePatch< Face, FaceList, PointField, PointType > &)
Return point-edge addressing sorted by order around the point.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
A list of faces which address into the list of points.
const labelListList & pointEdges() const
Return point-edge addressing.
label end() const
Return end vertex label.
const labelListList & faceEdges() const
Return face-edge addressing.
label start() const
Return start vertex label.