30 template<
class FaceList,
class Po
intField>
50 const labelList& pEdges = pointEdges[pointi];
54 label edgeI = pEdges[0];
56 label prevFacei = edgeFaces[edgeI][0];
61 label nVisitedEdges = 0;
68 const labelList& eFaces = edgeFaces[edgeI];
70 if (eFaces.
size() != 2)
75 label facei = eFaces[0];
76 if (facei == prevFacei)
82 const labelList& fEdges = faceEdges[facei];
86 const label nextEdgeI = fEdges[feI];
87 const edge& nextEdge = edges[nextEdgeI];
92 && (nextEdge.
start() == pointi || nextEdge.
end() == pointi)
103 if (nVisitedEdges > nPointEdges)
106 <<
"Unable to order pointEdges as the face connections "
107 <<
"are not circular" <<
nl
108 <<
" Original pointEdges = " << pEdges <<
nl
109 <<
" New pointEdges = " << newEdgeList
112 newEdgeList = pEdges;
117 }
while (edgeI != pEdges[0]);
119 if (newEdgeList.
size() == nPointEdges)
123 if (
findIndex(newEdgeList, pEdges[eI]) == -1)
126 <<
"Cannot find all original edges in the new list"
128 <<
" Original pointEdges = " << pEdges <<
nl
129 <<
" New pointEdges = " << newEdgeList
132 newEdgeList = pEdges;
#define forAll(list, i)
Loop across all elements in list.
void setCapacity(const label)
Alter the size of the underlying storage.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
void clear()
Clear the addressed list, i.e. set the size to zero.
void size(const label)
Override size to be inconsistent with allocated storage.
A list of faces which address into the list of points.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
label end() const
Return end vertex label.
label start() const
Return start vertex label.
#define WarningInFunction
Report a warning using Foam::Warning.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.