44 topoSetFaceZoneSource,
45 setAndNormalToFaceZone,
50 topoSetFaceZoneSource,
51 setAndNormalToFaceZone,
59 setAndNormalToFaceZone::typeName,
60 "\n Usage: setAndNormalToFaceZone <faceSet> <normal>\n\n" 61 " Select all faces in the faceSet and orient using normal.\n\n" 99 setName_(checkIs(is)),
112 if (!isA<faceZoneSet>(
set))
115 <<
"Operation only allowed on a faceZoneSet." <<
endl;
120 faceZoneSet& zoneSet = refCast<faceZoneSet>(
set);
126 Info<<
" Adding all faces from faceSet " << setName_
131 faceSet loadedSet(
mesh_, setName_);
135 DynamicList<label> newAddressing(zoneSet.addressing());
136 DynamicList<bool> newFlipMap(zoneSet.flipMap());
141 for (
const label facei : faceIds)
143 if (!zoneSet.found(facei))
145 newAddressing.
append(facei);
148 if ((
n & normal_) > 0)
150 newFlipMap.append(
false);
154 newFlipMap.append(
true);
159 zoneSet.addressing().transfer(newAddressing);
160 zoneSet.flipMap().transfer(newFlipMap);
167 Info<<
" Removing all faces from faceSet " << setName_
172 faceSet loadedSet(
mesh_, setName_);
175 DynamicList<label> newAddressing(zoneSet.addressing().size());
176 DynamicList<bool> newFlipMap(zoneSet.flipMap().size());
178 forAll(zoneSet.addressing(), i)
180 if (!loadedSet.found(zoneSet.addressing()[i]))
182 newAddressing.append(zoneSet.addressing()[i]);
183 newFlipMap.append(zoneSet.flipMap()[i]);
186 zoneSet.addressing().transfer(newAddressing);
187 zoneSet.flipMap().transfer(newFlipMap);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
setAndNormalToFaceZone(const polyMesh &mesh, const word &setName, const vector &normal)
Construct from components.
bool verbose_
Output verbosity (default: true)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void append(const T &val)
Append an element at the end of the list.
Create a new set and ADD elements to it.
Add elements to current set.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
List< face > faceList
A List of faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Macros for easy insertion into run-time selection tables.
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
vectorField pointField
pointField is a vectorField.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
A class for handling words, derived from Foam::string.
setAction
Enumeration defining various actions.
virtual const faceList & faces() const
Return raw faces.
const polyMesh & mesh_
Reference to the mesh.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Subtract elements from current set.
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
messageStream Info
Information stream (stdout output on master, null elsewhere)
The topoSetFaceZoneSource is a intermediate class for handling topoSet sources for selecting face zon...
Mesh consisting of general polyhedral cells.