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;
138 sortedPointEdges[pointi] = newEdgeList;
142 return sortedPointEdges;
const labelListList & pointEdges() const
Return point-edge addressing.
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A list of faces which address into the list of points.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
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.
const labelListList & edgeFaces() const
Return edge-face addressing.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
#define WarningInFunction
Report a warning using Foam::Warning.
label end() const
Return end vertex label.
const labelListList & faceEdges() const
Return face-edge addressing.
void clear()
Clear the addressed list, i.e. set the size to zero.
label start() const
Return start vertex label.