34 template<
class FaceList,
class Po
intField>
43 Pout<<
"PrimitivePatch<FaceList, PointField>::"
44 <<
"calcLocalPointOrder() : "
45 <<
"calculating local point order"
49 if (localPointOrderPtr_)
54 <<
"local point order already calculated"
58 const List<FaceType>& lf = localFaces();
62 boolList visitedFace(lf.size(),
false);
64 localPointOrderPtr_ =
new labelList(meshPoints().size(), -1);
66 labelList& pointOrder = *localPointOrderPtr_;
68 boolList visitedPoint(pointOrder.size(),
false);
74 if (!visitedFace[facei])
76 SLList<label> faceOrder(facei);
80 const label curFace = faceOrder.first();
82 faceOrder.removeHead();
84 if (!visitedFace[curFace])
86 visitedFace[curFace] =
true;
93 if (!visitedPoint[curPoints[pointi]])
95 visitedPoint[curPoints[pointi]] =
true;
97 pointOrder[
nPoints] = curPoints[pointi];
108 if (!visitedFace[nbrs[nbrI]])
110 faceOrder.append(nbrs[nbrI]);
114 }
while (faceOrder.size());
120 Pout<<
"PrimitivePatch<FaceList, PointField>::"
121 <<
"calcLocalPointOrder() "
122 <<
"finished calculating local point order"
Non-intrusive singly-linked list.
#define forAll(list, i)
Loop across all elements in list.
A list of faces which address into the list of points.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
List< label > labelList
A List of labels.
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.
errorManip< error > abort(error &err)
List< bool > boolList
Bool container classes.
List< labelList > labelListList
A List of labelList.
prefixOSstream Pout(cout, "Pout")