Base class of a source for a topoSet
.
More...
Classes | |
class | addToUsageTable |
Class with constructor to add usage string to table. More... | |
class | iNew |
Class used for the read-construction of. More... | |
Public Types | |
enum | sourceType { UNKNOWN_SOURCE = 0, CELL_TYPE = 0x1, FACE_TYPE = 0x2, POINT_TYPE = 0x4, SET_SOURCE = 0x10, CELLSET_SOURCE = (CELL_TYPE | SET_SOURCE), FACESET_SOURCE = (FACE_TYPE | SET_SOURCE), POINTSET_SOURCE = (POINT_TYPE | SET_SOURCE), ZONE_SOURCE = 0x20, CELLZONE_SOURCE = (CELL_TYPE | ZONE_SOURCE), FACEZONE_SOURCE = (FACE_TYPE | ZONE_SOURCE), POINTZONE_SOURCE = (POINT_TYPE | ZONE_SOURCE), CELLSETSOURCE = CELLSET_SOURCE, FACESETSOURCE = FACESET_SOURCE, POINTSETSOURCE = POINTSET_SOURCE, CELLZONESOURCE = CELLZONE_SOURCE, FACEZONESOURCE = FACEZONE_SOURCE, POINTZONESOURCE = POINTZONE_SOURCE } |
Enumeration defining the types of sources. More... | |
enum | setAction { ADD, SUBTRACT, NEW, SUBSET, INVERT, CLEAR, REMOVE, LIST, IGNORE, DELETE = SUBTRACT } |
Enumeration defining various actions. More... | |
Public Member Functions | |
TypeName ("topoSetSource") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, topoSetSource, word,(const polyMesh &mesh, const dictionary &dict),(mesh, dict)) | |
declareRunTimeSelectionTable (autoPtr, topoSetSource, istream,(const polyMesh &mesh, Istream &is),(mesh, is)) | |
topoSetSource (const polyMesh &mesh, bool verbose=true) | |
Construct from mesh, with preferred verbosity. More... | |
topoSetSource (const polyMesh &mesh, const dictionary &dict) | |
Construct from mesh, use "verbose" entry if present. More... | |
autoPtr< topoSetSource > | clone () const |
Clone (disallowed) More... | |
virtual | ~topoSetSource ()=default |
Destructor. More... | |
const polyMesh & | mesh () const noexcept |
Reference to the mesh. More... | |
bool | verbose () const noexcept |
Get output verbosity. More... | |
bool | verbose (bool on) noexcept |
Enable/disable verbose output. More... | |
void | verbose (const dictionary &dict) |
Use "verbose" entry (if present) to enable/disable verbose output. More... | |
virtual sourceType | setType () const =0 |
The source category (cell/face/point combined with set/zone) More... | |
virtual void | applyToSet (const topoSetSource::setAction action, topoSet &set) const =0 |
Apply specified action to the topoSet. More... | |
bool | hasTransform () const noexcept |
True if coordinate transform is active. More... | |
tmp< pointField > | transform (const pointField &points) const |
Coordinate transform (optionally) coordinates. Returns reference to input data if no transform is active. More... | |
Static Public Member Functions | |
static Istream & | checkIs (Istream &is) |
Check state of stream. More... | |
static bool | isSetSource (const sourceType t) noexcept |
True if a "set" source. More... | |
static bool | isZoneSource (const sourceType t) noexcept |
True if a "zone" source. More... | |
static bool | isCell (const sourceType t) noexcept |
True if "cell" geometric type. More... | |
static bool | isFace (const sourceType t) noexcept |
True if "face" geometric type. More... | |
static bool | isPoint (const sourceType t) noexcept |
True if "point" geometric type. More... | |
static const string & | usage (const word &name) |
static autoPtr< topoSetSource > | New (const word &topoSetSourceType, const polyMesh &mesh, const dictionary &dict) |
Return a reference to the selected topoSetSource. More... | |
static autoPtr< topoSetSource > | New (const word &topoSetSourceType, const polyMesh &mesh, Istream &is) |
Return a reference to the selected topoSetSource. More... | |
static setAction | toAction (const word &actionName) |
Deprecated(2018-07) convert string to action. More... | |
static bool | readNames (const dictionary &dict, wordList &names) |
Helper: extract wordList of patches/zones from dictionary. Returns. More... | |
Static Public Attributes | |
static const Enum< setAction > | actionNames |
The setActions enum text. Names: "new", add", "subtract", "subset", "invert",
"clear", "remove", "list", "ignore". More... | |
static const Enum< setAction > | combineNames |
The setAction enum text when combining selections. Names: "use", "add", "subtract", "subset", "invert", "ignore". More... | |
Protected Member Functions | |
void | addOrDelete (topoSet &set, const label id, const bool add) const |
Add or delete id from set. Add when 'add' is true. More... | |
void | addOrDelete (topoSet &set, const labelUList &labels, const bool add) const |
Add or delete labels from set. Add when 'add' is true. More... | |
void | addOrDelete (topoSet &set, const bitSet &labels, const bool add) const |
Add or delete labels from set. Add when 'add' is true. More... | |
topoSetSource (const topoSetSource &)=delete | |
No copy construct. More... | |
void | operator= (const topoSetSource &)=delete |
No copy assignment. More... | |
Static Protected Member Functions | |
static bool | check (labelList &list, const label maxLabel) |
Detect and remove any values less than 0 or ge maxLabel. More... | |
Protected Attributes | |
const polyMesh & | mesh_ |
Reference to the mesh. More... | |
bool | verbose_ |
Output verbosity (default: true) More... | |
autoPtr< solidBodyMotionFunction > | transformPtr_ |
Optional transformation for geometric data. More... | |
Static Protected Attributes | |
static const string | illegalSource_ |
static HashTable< string > * | usageTablePtr_ = nullptr |
A table of usage strings. More... | |
Base class of a source for a topoSet
.
Implementer must modify the given set (see applyToSet
) according to its function and the setAction
(one of ADD/SUBTRACT/NEW).
Definition at line 63 of file topoSetSource.H.
enum sourceType |
Enumeration defining the types of sources.
Enumerator | |
---|---|
UNKNOWN_SOURCE | Placeholder. |
CELL_TYPE | Geometric type is "cell". |
FACE_TYPE | Geometric type is "face". |
POINT_TYPE | Geometric type is "point". |
SET_SOURCE | A source based on topoSet. |
CELLSET_SOURCE | Cells as set. |
FACESET_SOURCE | Faces as set. |
POINTSET_SOURCE | Points as set. |
ZONE_SOURCE | A source based on mesh zone. |
CELLZONE_SOURCE | Cells as zone. |
FACEZONE_SOURCE | Faces as zone. |
POINTZONE_SOURCE | Points as zone. |
CELLSETSOURCE | |
FACESETSOURCE | |
POINTSETSOURCE | |
CELLZONESOURCE | |
FACEZONESOURCE | |
POINTZONESOURCE |
Definition at line 72 of file topoSetSource.H.
enum setAction |
Enumeration defining various actions.
Enumerator | |
---|---|
ADD | Add elements to current set. |
SUBTRACT | Subtract elements from current set. |
NEW | Create a new set and ADD elements to it. |
SUBSET | Union of elements with current set. |
INVERT | Invert the elements in the current set. |
CLEAR | Clear the set, possibly creating it. |
REMOVE | Remove the set (from the file system) |
LIST | Print contents of the set. |
IGNORE | "ignore" no-op action |
DELETE |
|
Definition at line 100 of file topoSetSource.H.
|
protecteddelete |
No copy construct.
|
explicit |
Construct from mesh, with preferred verbosity.
Definition at line 243 of file topoSetSource.C.
topoSetSource | ( | const polyMesh & | mesh, |
const dictionary & | dict | ||
) |
Construct from mesh, use "verbose" entry if present.
Definition at line 255 of file topoSetSource.C.
|
virtualdefault |
Destructor.
|
staticprotected |
Detect and remove any values less than 0 or ge maxLabel.
Definition at line 84 of file topoSetSource.C.
References List< T >::resize(), and UList< T >::size().
|
protected |
Add or delete id from set. Add when 'add' is true.
Definition at line 181 of file topoSetSource.C.
References Foam::add().
|
protected |
Add or delete labels from set. Add when 'add' is true.
Definition at line 199 of file topoSetSource.C.
References Foam::add().
Add or delete labels from set. Add when 'add' is true.
Definition at line 217 of file topoSetSource.C.
References Foam::add().
|
protecteddelete |
No copy assignment.
TypeName | ( | "topoSetSource" | ) |
Runtime type information.
|
static |
Check state of stream.
Definition at line 166 of file topoSetSource.C.
References IOstream::eof(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and IOstream::good().
|
inlinestaticnoexcept |
True if a "set" source.
Definition at line 253 of file topoSetSource.H.
References topoSetSource::SET_SOURCE.
|
inlinestaticnoexcept |
True if a "zone" source.
Definition at line 261 of file topoSetSource.H.
References topoSetSource::ZONE_SOURCE.
|
inlinestaticnoexcept |
True if "cell" geometric type.
Definition at line 269 of file topoSetSource.H.
References topoSetSource::CELL_TYPE.
|
inlinestaticnoexcept |
True if "face" geometric type.
Definition at line 277 of file topoSetSource.H.
References topoSetSource::FACE_TYPE.
|
inlinestaticnoexcept |
True if "point" geometric type.
Definition at line 285 of file topoSetSource.H.
References topoSetSource::POINT_TYPE.
declareRunTimeSelectionTable | ( | autoPtr | , |
topoSetSource | , | ||
word | , | ||
(const polyMesh &mesh, const dictionary &dict) | , | ||
(mesh, dict) | |||
) |
declareRunTimeSelectionTable | ( | autoPtr | , |
topoSetSource | , | ||
istream | , | ||
(const polyMesh &mesh, Istream &is) | , | ||
(mesh, is) | |||
) |
Definition at line 345 of file topoSetSource.H.
References topoSetSource::illegalSource_, Foam::name(), and topoSetSource::usageTablePtr_.
|
inline |
|
static |
Return a reference to the selected topoSetSource.
Definition at line 120 of file topoSetSource.C.
References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and mesh.
Referenced by topoSetSource::iNew::operator()().
|
static |
Return a reference to the selected topoSetSource.
Definition at line 144 of file topoSetSource.C.
References Foam::exit(), Foam::FatalError, FatalErrorInLookup, and mesh.
|
inlinenoexcept |
Reference to the mesh.
Definition at line 413 of file topoSetSource.H.
References topoSetSource::mesh_.
|
inlinenoexcept |
Get output verbosity.
Definition at line 421 of file topoSetSource.H.
References topoSetSource::verbose_.
|
inlinenoexcept |
Enable/disable verbose output.
Definition at line 431 of file topoSetSource.H.
References topoSetSource::verbose_.
void verbose | ( | const dictionary & | dict | ) |
Use "verbose" entry (if present) to enable/disable verbose output.
Definition at line 272 of file topoSetSource.C.
References dict, keyType::LITERAL, and dictionary::readIfPresent().
|
pure virtual |
The source category (cell/face/point combined with set/zone)
Implemented in topoSetFaceZoneSource, topoSetCellZoneSource, topoSetPointZoneSource, topoSetCellSource, topoSetFaceSource, and topoSetPointSource.
|
pure virtual |
Apply specified action to the topoSet.
Implemented in surfaceToCell, faceZoneToCell, faceToCell, cellToFace, surfaceToPoint, pointToFace, pointToCell, regionToCell, cellToPoint, cellToFaceZone, zoneToFace, planeToFaceZone, zoneToCell, zoneToPoint, cylinderToCell, cylinderToFace, cylinderToPoint, faceToPoint, targetVolumeToCell, fieldToCell, regionToFace, rotatedBoxToCell, setsToFaceZone, holeToFace, boxToCell, boxToFace, boxToPoint, sphereToCell, faceToFace, sphereToFace, sphereToPoint, cellToCell, pointToPoint, shapeToCell, normalToFace, searchableSurfaceToFace, haloToCell, searchableSurfaceToCell, searchableSurfaceToFaceZone, patchToFace, searchableSurfaceToPoint, clipPlaneToCell, clipPlaneToFace, clipPlaneToPoint, patchToCell, setAndNormalToFaceZone, setToFaceZone, nearestToCell, nearestToPoint, setToPointZone, labelToCell, labelToFace, labelToPoint, setToCellZone, faceZoneToFaceZone, nbrToCell, boundaryToCell, boundaryToFace, regionsToCell, badQualityToFace, and badQualityToCell.
|
inlinenoexcept |
True if coordinate transform is active.
Definition at line 464 of file topoSetSource.H.
References topoSetSource::transformPtr_.
Foam::tmp< Foam::pointField > transform | ( | const pointField & | points | ) | const |
Coordinate transform (optionally) coordinates. Returns reference to input data if no transform is active.
Definition at line 284 of file topoSetSource.C.
References points, and Foam::transformPoints().
Deprecated(2018-07) convert string to action.
Definition at line 480 of file topoSetSource.H.
References topoSetSource::actionNames.
|
static |
Helper: extract wordList of patches/zones from dictionary. Returns.
true if zone(s). Order of parsing is sets, zones, set, zone
Definition at line 301 of file topoSetSource.C.
References dict, UList< T >::front(), keyType::LITERAL, Foam::PtrListOps::names(), dictionary::readEntry(), dictionary::readIfPresent(), and List< T >::resize().
|
static |
The setActions enum text. Names: "new", add", "subtract", "subset", "invert", "clear", "remove", "list", "ignore".
Definition at line 123 of file topoSetSource.H.
Referenced by topoSetSource::toAction().
|
static |
The setAction enum text when combining selections. Names: "use", "add", "subtract", "subset", "invert", "ignore".
Definition at line 132 of file topoSetSource.H.
Referenced by cellBitSet::select().
|
staticprotected |
Definition at line 137 of file topoSetSource.H.
Referenced by topoSetSource::usage().
|
staticprotected |
A table of usage strings.
Definition at line 142 of file topoSetSource.H.
Referenced by topoSetSource::addToUsageTable::addToUsageTable(), topoSetSource::usage(), and topoSetSource::addToUsageTable::~addToUsageTable().
|
protected |
Reference to the mesh.
Definition at line 176 of file topoSetSource.H.
Referenced by topoSetSource::mesh().
|
protected |
Output verbosity (default: true)
Definition at line 181 of file topoSetSource.H.
Referenced by topoSetSource::verbose().
|
protected |
Optional transformation for geometric data.
Definition at line 186 of file topoSetSource.H.
Referenced by topoSetSource::hasTransform().