37 template<
class FaceList,
class Po
intField>
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);
List< labelList > labelListList
A List of labelList.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
A list of faces which address into the list of points.
#define DebugInFunction
Report an information message using Foam::Info.
errorManip< error > abort(error &err)
#define DebugInfo
Report an information message using Foam::Info.
List< label > labelList
A List of labels.
List< bool > boolList
A List of bools.
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)