31 template<
class ZoneType,
class UnaryOp,
class ZoneGenType>
34 const ZoneGenType& zoneGen,
44 if (uop(zoneGen.contains(pts[i])))
56 template<
class ZoneType,
class UnaryOp,
class ZoneGenType>
59 const ZoneGenType& zoneGen,
65 if (!zoneGenerators.size())
67 return select<ZoneType, UnaryOp>(zoneGen, pts, uop);
72 forAll(zoneGenerators, zgi)
74 zoneSet zs(zoneGenerators[zgi].generate());
80 if (uop(zoneGen.contains(pts[zsIndices[i]])))
82 selected[zsIndices[i]] =
true;
87 return indices(selected);
91 template<
class ZoneType,
class ZoneGenType>
94 const ZoneGenType& zoneGen,
99 if (select_ == selection::inside)
101 return zoneGen.template select<ZoneType>
111 return zoneGen.template select<ZoneType>
122 template<
class UnaryOp,
class ZoneGenType>
125 const ZoneGenType& zoneGen,
132 if (!zoneGenerators.size())
134 return select<faceZone>(zoneGen, pts, uop);
137 bool oriented =
true;
140 forAll(zoneGenerators, zgi)
142 zoneSet zs(zoneGenerators[zgi].generate());
149 flipMap.
setSize(mesh_.nFaces(),
false);
154 if (uop(zoneGen.contains(pts[zsIndices[i]])))
156 selected[zsIndices[i]] =
true;
157 flipMap[zsIndices[i]] = zsFlipMap[i];
168 if (uop(zoneGen.contains(pts[zsIndices[i]])))
170 selected[zsIndices[i]] =
true;
176 labelList faceIndices(indices(selected));
180 flipMap =
boolList(flipMap, faceIndices);
187 template<
class ZoneGenType>
190 const ZoneGenType& zoneGen,
196 if (select_ == selection::inside)
198 return zoneGen.select
209 return zoneGen.select
221 template<
class ZoneGenType>
224 const ZoneGenType& zoneGen
238 zoneGen.template selectOp<pointZone>
258 zoneGen.template selectOp<cellZone>
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
void clear()
Clear the list, i.e. set size to zero.
void setSize(const label)
Reset size of List.
Named list of cell indices representing a sub-set of the mesh.
Named list of face indices representing a sub-set of the mesh faces.
const boolList & flipMap() const
Return face flip map.
bool oriented() const
Return true if the faceZone is oriented, i.e. the flipMap is set.
Named list of point indices representing a sub-set of the mesh faces.
static labelList indices(const boolList &selected)
Return the list of selected indices.
labelList selectOp(const ZoneGenType &zoneGen, const zoneGeneratorList &zoneGenerators, const vectorField &pts) const
virtual zoneSet generate() const =0
Generate and return the zoneSet.
labelList select(const ZoneGenType &zoneGen, const vectorField &pts, const UnaryOp &uop) const
Zone container returned by zoneGenerator::generate.
const faceZone & fZone() const
Return a reference to the faceZone if allocated.
const ZoneType & zone() const
Return a reference to the zone type.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< bool > boolList
Bool container classes.