36 namespace zoneGenerators
46 template<
class ZoneType,
class UnaryOp>
57 surfacePtr_->getVolumeType(pts, volType);
74 template<
class ZoneType,
class UnaryOp>
83 if (!zoneGenerators.size())
85 return zoneGen.
select<ZoneType>(zoneGen, pts, uop);
90 forAll(zoneGenerators, zgi)
92 zoneSet zs(zoneGenerators[zgi].generate());
98 surfacePtr_->getVolumeType(zonePoints, volType);
104 selected[zsIndices[i]] =
true;
109 return indices(selected);
113 template<
class UnaryOp>
123 if (!zoneGenerators.size())
125 return select<faceZone>(zoneGen, pts, uop);
128 bool oriented =
true;
131 forAll(zoneGenerators, zgi)
133 zoneSet zs(zoneGenerators[zgi].generate());
140 surfacePtr_->getVolumeType(zonePoints, volType);
144 flipMap.
setSize(mesh_.nFaces(),
false);
151 selected[zsIndices[i]] =
true;
152 flipMap[zsIndices[i]] = zsFlipMap[i];
165 selected[zsIndices[i]] =
true;
171 return indices(selected);
197 mesh.time().constant(),
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
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.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
A class for handling words, derived from string.
Abstract base class for all zoneGenerators, providing runtime selection.
static labelList indices(const boolList &selected)
Return the list of selected indices.
A zoneGenerator which selects points, cells or faces with centres either inside or outside a surface.
virtual zoneSet generate() const
Generate and return the zoneSet.
labelList select(const insideSurface &zoneGen, const vectorField &pts, const UnaryOp &uop) const
virtual ~insideSurface()
Destructor.
insideSurface(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
A zoneGenerator which looks-up and returns a zoneSet containing point, and/or cell and/or faces zones...
Abstract zoneGenerator which selects points, cells or faces with centres either inside a volume.
virtual zoneSet generate() const =0
Generate and return the zoneSet.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
defineTypeNameAndDebug(cylinderHeadPoints, 0)
addToRunTimeSelectionTable(zoneGenerator, cylinderHeadPoints, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)