35 template<
class BoolListType,
class FaceList,
class Po
intField>
39 const BoolListType& borderEdge,
41 const label currentZone,
58 label facei = changedFaces[i];
60 const labelList& fEdges = faceEdges[facei];
64 label edgeI = fEdges[fEdgeI];
66 if (!borderEdge[edgeI])
68 const labelList& eFaceLst = edgeFaces[edgeI];
72 label nbrFacei = eFaceLst[j];
74 if (faceZone[nbrFacei] == -1)
76 faceZone[nbrFacei] = currentZone;
77 newChangedFaces.
append(nbrFacei);
79 else if (faceZone[nbrFacei] != currentZone)
82 <<
"Zones " << faceZone[nbrFacei]
83 <<
" at face " << nbrFacei
84 <<
" connects to zone " << currentZone
85 <<
" at face " << facei
93 if (newChangedFaces.empty())
99 changedFaces.
transfer(newChangedFaces);
104 template<
class BoolListType,
class FaceList,
class Po
intField>
108 const BoolListType& borderEdge,
116 for (
label startFacei = 0; startFacei < faceZone.
size();)
119 for (; startFacei < faceZone.
size(); ++startFacei)
121 if (faceZone[startFacei] == -1)
123 faceZone[startFacei] = zoneI;
124 markZone(p, borderEdge, startFacei, zoneI, faceZone);
135 template<
class BoolListType,
class FaceList,
class Po
intField>
139 const BoolListType& includeFaces,
158 if (includeFaces[oldFacei])
161 faceMap[facei++] = oldFacei;
164 const FaceType&
f = localFaces[oldFacei];
168 const label ptLabel = f[fp];
169 if (!pointHad[ptLabel])
171 pointHad[ptLabel] =
true;
172 pointMap[pointi++] = ptLabel;
184 template<
class FaceList,
class Po
intField>
201 bb = boundBox::invertedBox;
205 const FaceType&
f = p[facei];
209 label pointi = f[fp];
210 if (pointIsUsed.set(pointi, 1u))
label nPoints() const
Return number of points supporting patch faces.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
A bounding box defined in terms of the points at its extremities.
A list of faces which address into the list of points.
void append(const T &)
Append an element at the end of the list.
const Field< PointType > & points() const
Return reference to global points.
const labelListList & edgeFaces() const
Return edge-face addressing.
errorManip< error > abort(error &err)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
const point & max() const
Maximum describing the bounding box.
std::remove_reference< FaceList >::type::value_type FaceType
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
const labelListList & faceEdges() const
Return face-edge addressing.
const point & min() const
Minimum describing the bounding box.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.