34 namespace zoneGenerators
44 void Foam::zoneGenerators::Union::select
58 void Foam::zoneGenerators::Union::select
69 selected[indices[i]] = select;
70 flipMap[indices[i]] = zoneFlipMap[i];
88 zoneSet zs(zoneGenerators_[i].generate());
91 const bool sel =
all ? false : (
diff ? i == 0 :
true);
100 select(selectedPoints, zs.
pZone(), sel);
110 select(selectedCells, zs.
cZone(), sel);
125 if (!oriented && flipMap.
size())
129 <<
" is not oriented"
130 " so the resulting faceZone will not be oriented"
134 else if (oriented && selectedFaces.
size() && !flipMap.
size())
138 <<
" is oriented but a previous faceZone is not "
139 " so the resulting faceZone will not be oriented"
148 flipMap.
setSize(mesh_.nFaces(),
false);
161 select(selectedFaces, zs.
fZone(), sel);
166 moveUpdate_ = zoneGenerators_.moveUpdate();
168 const labelList faceIndices(indices(selectedFaces));
172 selectedPoints.
size()
176 indices(selectedPoints),
186 indices(selectedCells),
244 return generate(
false,
false);
#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 clear()
Clear the list, i.e. set size to zero.
void setSize(const label)
Reset size of List.
const word & name() const
Return name.
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.
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 all the elements from the zones generated by the given list of zoneGene...
virtual zoneSet generate() const
Generate and return the zoneSet.
virtual ~Union()
Destructor.
Union(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)
#define WarningInFunction
Report a warning using Foam::Warning.
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< bool > boolList
Bool container classes.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
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.