59 setAndNormalToFaceZone::typeName,
60 "\n Usage: setAndNormalToFaceZone <faceSet> <normal>\n\n"
61 " Select all faces in the faceSet and orient using normal.\n\n"
115 <<
"Operation only allowed on a faceZoneSet." <<
endl;
126 Info<<
" Adding all faces from face set: "
127 << setName_ <<
" ..." <<
endl;
135 DynamicList<label> newAddressing(zoneSet.addressing());
136 DynamicList<bool> newFlipMap(zoneSet.flipMap());
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 face set: "
168 << setName_ <<
" ..." <<
endl;
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);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
labelList faceLabels(nFaceLabels)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
@ NO_REGISTER
Do not request registration (bool: false).
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Like faceSet but -reads data from faceZone -updates faceZone when writing.
const boolList & flipMap() const noexcept
const labelList & addressing() const noexcept
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
Mesh consisting of general polyhedral cells.
A topoSetSource to select faces based on usage in a faceSet, where the normal vector is used to orien...
setAndNormalToFaceZone(const polyMesh &mesh, const word &setName, const vector &normal)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
The topoSetFaceZoneSource is a intermediate class for handling topoSet sources for selecting face zon...
topoSetFaceZoneSource(const polyMesh &mesh)
Construct from mesh.
Class with constructor to add usage string to table.
Base class of a source for a topoSet.
setAction
Enumeration defining various actions.
@ SUBTRACT
Subtract elements from current set.
@ ADD
Add elements to current set.
@ NEW
Create a new set and ADD elements to it.
bool verbose_
Output verbosity (default: true).
const polyMesh & mesh() const noexcept
Reference to the mesh.
const polyMesh & mesh_
Reference to the mesh.
static Istream & checkIs(Istream &is)
Check state of stream.
General set of labels of mesh quantity (points, cells, faces).
virtual bool found(const label id) const
Has the given index?
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define WarningInFunction
Report a warning using Foam::Warning.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
messageStream Info
Information stream (stdout output on master, null elsewhere).
List< face > faceList
List of faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.