41 template<
class>
class FaceList,
50 const BoolListType& borderEdge,
52 const label currentZone,
69 label faceI = changedFaces[i];
71 const labelList& fEdges = faceEdges[faceI];
75 label edgeI = fEdges[fEdgeI];
77 if (!borderEdge[edgeI])
79 const labelList& eFaceLst = edgeFaces[edgeI];
83 label nbrFaceI = eFaceLst[j];
85 if (faceZone[nbrFaceI] == -1)
87 faceZone[nbrFaceI] = currentZone;
88 newChangedFaces.
append(nbrFaceI);
90 else if (faceZone[nbrFaceI] != currentZone)
94 "PatchTools::markZone" 96 "const PrimitivePatch<Face, FaceList, " 97 "PointField, PointType>& p," 98 "const BoolListType& borderEdge," 100 "const label currentZone," 101 "labelList& faceZone" 104 <<
"Zones " << faceZone[nbrFaceI]
105 <<
" at face " << nbrFaceI
106 <<
" connects to zone " << currentZone
107 <<
" at face " << faceI
115 if (newChangedFaces.empty())
121 changedFaces.
transfer(newChangedFaces);
132 template<
class>
class FaceList,
141 const BoolListType& borderEdge,
149 for (
label startFaceI = 0; startFaceI < faceZone.
size();)
152 for (; startFaceI < faceZone.
size(); ++startFaceI)
154 if (faceZone[startFaceI] == -1)
156 faceZone[startFaceI] = zoneI;
157 markZone(p, borderEdge, startFaceI, zoneI, faceZone);
175 template<
class>
class FaceList,
184 const BoolListType& includeFaces,
201 if (includeFaces[oldFaceI])
204 faceMap[faceI++] = oldFaceI;
207 const Face&
f = localFaces[oldFaceI];
211 const label ptLabel = f[fp];
212 if (!pointHad[ptLabel])
214 pointHad[ptLabel] =
true;
215 pointMap[pointI++] = ptLabel;
230 template<
class>
class FaceList,
248 bb = boundBox::invertedBox;
252 const Face&
f = p[faceI];
256 label pointI = f[fp];
257 if (pointIsUsed.set(pointI, 1u))
const pointField & points
const point & min() const
Minimum describing the bounding box.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
const labelListList & edgeFaces() const
Return edge-face addressing.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void size(const label)
Override size to be inconsistent with allocated storage.
static label markZones(const PrimitivePatch< Face, FaceList, PointField, PointType > &, const BoolListType &borderEdge, labelList &faceZone)
Size and fills faceZone with zone of face.
label nPoints() const
Return number of points supporting patch faces.
void setSize(const label)
Reset size of List.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const point & max() const
Maximum describing the bounding box.
static void calcBounds(const PrimitivePatch< Face, FaceList, PointField, PointType > &p, boundBox &bb, label &nPoints)
errorManip< error > abort(error &err)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A bounding box defined in terms of the points at its extremities.
A list of faces which address into the list of points.
const labelListList & faceEdges() const
Return face-edge addressing.
static void subsetMap(const PrimitivePatch< Face, FaceList, PointField, PointType > &, const BoolListType &includeFaces, labelList &pointMap, labelList &faceMap)
Determine the mapping for a sub-patch.
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
void append(const T &)
Append an element at the end of the list.
static void markZone(const PrimitivePatch< Face, FaceList, PointField, PointType > &, const BoolListType &borderEdge, const label faceI, const label currentZone, labelList &faceZone)
Fill faceZone with currentZone for every face reachable.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const Field< PointType > & points() const
Return reference to global points.