34 namespace zoneGenerators
44 void Foam::zoneGenerators::intersection::countIntersections
52 nIntersections[indices[i]]++;
57 void Foam::zoneGenerators::intersection::countIntersections
67 nIntersections[indices[i]]++;
68 flipMap[indices[i]] = zoneFlipMap[i];
78 const label nZones = zoneGenerators_.size();
82 if (nIntersections[i] == nZones)
93 if (nIntersections[i] == nZones)
95 intersectionIndices[ui++] = i;
99 return intersectionIndices;
138 forAll(zoneGenerators_, i)
140 zoneSet zs(zoneGenerators_[i].generate());
148 nPointIntersections.
setSize(mesh_.nPoints(), 0);
149 countIntersections(nPointIntersections, zs.
pZone());
158 nCellIntersections.
setSize(mesh_.nCells(), 0);
159 countIntersections(nCellIntersections, zs.
cZone());
168 nFaceIntersections.
setSize(mesh_.nFaces(), 0);
172 flipMap.
setSize(mesh_.nFaces(),
false);
183 countIntersections(nFaceIntersections, zs.
fZone());
188 moveUpdate_ = zoneGenerators_.moveUpdate();
190 const labelList faceIndices(indices(nFaceIntersections));
194 nPointIntersections.
size()
198 indices(nPointIntersections),
204 nCellIntersections.
size()
208 indices(nCellIntersections),
214 nFaceIntersections.
size()
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
Named list of cell indices representing a sub-set of the mesh.
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.
Named list of point indices representing a sub-set of the mesh faces.
Mesh consisting of general polyhedral cells.
A class for handling words, derived from string.
bool moveUpdate() const
Return true if any of the zoneGenerators updates any of the zones.
Abstract base class for all zoneGenerators, providing runtime selection.
bool moveUpdate_
Switch to update the zones if the mesh points are moved.
A zoneGenerator which selects the elements which are in all the zones generated by the given list of ...
virtual zoneSet generate() const
Generate and return the zoneSet.
virtual ~intersection()
Destructor.
intersection(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
Zone container returned by zoneGenerator::generate.
const faceZone & fZone() const
Return a reference to the faceZone if allocated.
const cellZone & cZone() const
Return a reference to the cellZone if allocated.
bool pValid() const
Return true if the pointZone is allocated.
const pointZone & pZone() const
Return a reference to the pointZone if allocated.
bool fValid() const
Return true if the faceZone is allocated.
bool cValid() const
Return true if the cellZone is allocated.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
defineTypeNameAndDebug(cylinderHeadPoints, 0)
addToRunTimeSelectionTable(zoneGenerator, cylinderHeadPoints, dictionary)
zoneTypesAll
Enumeration defining the zone types with an option for all the types.
List< label > labelList
A List of labels.
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.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
const NamedEnum< zoneTypesAll, 4 > zoneTypesAllNames
Named enumeration defining the zone type names.