37template<
class FaceList,
class Po
intField>
39Foam::PrimitivePatch<FaceList, PointField>::calcLocalPointOrder()
const
46 if (localPointOrderPtr_)
50 <<
"local point order already calculated"
54 const List<face_type>& lf = localFaces();
58 localPointOrderPtr_.reset(
new labelList(meshPoints().size(), -1));
59 auto& pointOrder = *localPointOrderPtr_;
61 boolList visitedFace(lf.size(),
false);
62 boolList visitedPoint(pointOrder.size(),
false);
67 CircularBuffer<label> faceOrder(32);
71 if (!visitedFace[facei])
73 faceOrder.push_back(facei);
75 while (!faceOrder.empty())
78 const label curFace = faceOrder.front();
79 faceOrder.pop_front();
81 if (!visitedFace[curFace])
83 visitedFace[curFace] =
true;
86 for (
const label pointi : lf[curFace])
88 if (!visitedPoint[pointi])
90 visitedPoint[pointi] =
true;
100 for (
const label nbrFacei : ff[curFace])
102 if (!visitedFace[nbrFacei])
104 faceOrder.push_back(nbrFacei);
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define DebugInfo
Report an information message using Foam::Info.
#define DebugInFunction
Report an information message using Foam::Info.
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
List< bool > boolList
A List of bools.
#define forAll(list, i)
Loop across all elements in list.