Go to the documentation of this file.
41 template<
class>
class FaceList,
49 const PrimitivePatch<Face, FaceList, PointField, PointType>&
p,
50 const BoolListType& borderEdge,
52 const label currentZone,
65 DynamicList<label> newChangedFaces(2*changedFaces.size());
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)
93 <<
"Zones " << faceZone[nbrFaceI]
94 <<
" at face " << nbrFaceI
95 <<
" connects to zone " << currentZone
96 <<
" at face " << faceI
104 if (newChangedFaces.empty())
110 changedFaces.transfer(newChangedFaces);
121 template<
class>
class FaceList,
129 const PrimitivePatch<Face, FaceList, PointField, PointType>&
p,
130 const BoolListType& borderEdge,
134 faceZone.setSize(
p.size());
138 for (
label startFaceI = 0; startFaceI < faceZone.size();)
141 for (; startFaceI < faceZone.size(); ++startFaceI)
143 if (faceZone[startFaceI] == -1)
145 faceZone[startFaceI] = zoneI;
146 markZone(
p, borderEdge, startFaceI, zoneI, faceZone);
164 template<
class>
class FaceList,
172 const PrimitivePatch<Face, FaceList, PointField, PointType>&
p,
173 const BoolListType& includeFaces,
184 pointMap.setSize(
p.nPoints());
186 boolList pointHad(pointMap.size(),
false);
190 if (includeFaces[oldFaceI])
196 const Face&
f = localFaces[oldFaceI];
200 const label ptLabel =
f[fp];
201 if (!pointHad[ptLabel])
203 pointHad[ptLabel] =
true;
204 pointMap[pointI++] = ptLabel;
212 pointMap.setSize(pointI);
219 template<
class>
class FaceList,
232 const PointField&
points =
p.points();
241 const Face&
f =
p[faceI];
246 if (pointIsUsed.
set(pointI, 1u))
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< label > labelList
A List of labels.
const point & max() const
Maximum describing the bounding box.
#define forAll(list, i)
Loop across all elements in list.
static const boundBox invertedBox
A very large inverted boundBox: min/max == +/- VGREAT.
void set(const PackedList< 1 > &)
Set specified bits.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const point & min() const
Minimum describing the bounding box.
errorManip< error > abort(error &err)
List< bool > boolList
Bool container classes.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
List< labelList > labelListList
A List of labelList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A bounding box defined in terms of the points at its extremities.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
A list of faces which address into the list of points.