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 { CELLSETSOURCE, FACESETSOURCE, POINTSETSOURCE, CELLZONESOURCE, FACEZONESOURCE, POINTZONESOURCE } |
Enumeration defining the types of sources. More... | |
enum | setAction { CLEAR, NEW, INVERT, ADD, DELETE, SUBSET, LIST, REMOVE } |
Enumeration defining the valid 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) | |
Construct from components. More... | |
autoPtr< topoSetSource > | clone () const |
Clone. More... | |
virtual | ~topoSetSource () |
Destructor. More... | |
const polyMesh & | mesh () const |
virtual sourceType | setType () const =0 |
virtual void | applyToSet (const setAction action, topoSet &) const =0 |
Static Public Member Functions | |
static setAction | toAction (const word &actionName) |
Convert string to action. More... | |
static Istream & | checkIs (Istream &is) |
Check state of stream. 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... | |
Protected Member Functions | |
void | addOrDelete (topoSet &set, const label celli, const bool) const |
Add (if bool) celli to set or delete celli from set. More... | |
Protected Attributes | |
const polyMesh & | mesh_ |
Static Protected Attributes | |
static HashTable< string > * | usageTablePtr_ = nullptr |
A table of usage strings. More... | |
Base class of a source for a topoSet.
Implementer has to modify the given set (see applyToSet) according to its function and the setAction (one of add/delete/new)
Definition at line 63 of file topoSetSource.H.
enum sourceType |
Enumeration defining the types of sources.
Enumerator | |
---|---|
CELLSETSOURCE | |
FACESETSOURCE | |
POINTSETSOURCE | |
CELLZONESOURCE | |
FACEZONESOURCE | |
POINTZONESOURCE |
Definition at line 70 of file topoSetSource.H.
enum setAction |
Enumeration defining the valid actions.
Enumerator | |
---|---|
CLEAR | |
NEW | |
INVERT | |
ADD | |
DELETE | |
SUBSET | |
LIST | |
REMOVE |
Definition at line 82 of file topoSetSource.H.
topoSetSource | ( | const polyMesh & | mesh | ) |
Construct from components.
Definition at line 159 of file topoSetSource.C.
|
virtual |
Destructor.
Definition at line 167 of file topoSetSource.C.
Referenced by topoSetSource::clone().
Add (if bool) celli to set or delete celli from set.
Definition at line 140 of file topoSetSource.C.
Referenced by topoSetSource::checkIs().
TypeName | ( | "topoSetSource" | ) |
Runtime type information.
Convert string to action.
Definition at line 157 of file topoSetSource.H.
References topoSetSource::checkIs(), topoSetSource::declareRunTimeSelectionTable(), dict, topoSetSource::mesh(), and topoSetSource::mesh_.
|
static |
Check state of stream.
Definition at line 121 of file topoSetSource.C.
References topoSetSource::addOrDelete(), IOstream::eof(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and IOstream::good().
Referenced by topoSetSource::toAction().
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 216 of file topoSetSource.H.
References HashTable< T, Key, Hash >::found(), Foam::name(), and topoSetSource::usageTablePtr_.
|
inline |
Clone.
Definition at line 242 of file topoSetSource.H.
References topoSetSource::New(), NotImplemented, and topoSetSource::~topoSetSource().
|
static |
Return a reference to the selected topoSetSource.
Definition at line 74 of file topoSetSource.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and mesh.
Referenced by topoSetSource::clone(), NamedEnum< directionType, 3 >::names(), and topoSetSource::iNew::operator()().
|
static |
Return a reference to the selected topoSetSource.
Definition at line 98 of file topoSetSource.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and mesh.
|
inline |
Definition at line 274 of file topoSetSource.H.
References topoSetSource::applyToSet(), topoSetSource::mesh_, and topoSetSource::setType().
Referenced by topoSetSource::toAction().
|
pure virtual |
Implemented in surfaceToCell, regionToCell, surfaceToPoint, cellToFace, faceToCell, pointToFace, targetVolumeToCell, faceZoneToCell, pointToCell, fieldToCell, cellToPoint, faceToPoint, regionToFace, cylinderAnnulusToCell, rotatedBoxToCell, cylinderToCell, shapeToCell, sphereToCell, boxToCell, setsToFaceZone, nbrToCell, zoneToCell, boxToFace, patchToFace, zoneToFace, boxToPoint, zoneToPoint, labelToCell, nearestToCell, labelToFace, labelToPoint, nearestToPoint, setAndNormalToFaceZone, normalToFace, badQualityToCell, badQualityToFace, setToFaceZone, cellToCell, setToCellZone, faceToFace, faceZoneToFaceZone, pointToPoint, setToPointZone, boundaryToFace, and searchableSurfaceToFaceZone.
Referenced by topoSetSource::mesh().
Implemented in surfaceToCell, regionToCell, surfaceToPoint, cellToFace, faceToCell, pointToFace, targetVolumeToCell, faceZoneToCell, pointToCell, fieldToCell, cellToPoint, faceToPoint, regionToFace, cylinderAnnulusToCell, rotatedBoxToCell, cylinderToCell, shapeToCell, sphereToCell, boxToCell, setsToFaceZone, nbrToCell, zoneToCell, boxToFace, patchToFace, zoneToFace, boxToPoint, zoneToPoint, labelToCell, nearestToCell, labelToFace, labelToPoint, nearestToPoint, setAndNormalToFaceZone, normalToFace, badQualityToCell, badQualityToFace, setToFaceZone, cellToCell, setToCellZone, faceToFace, faceZoneToFaceZone, pointToPoint, setToPointZone, boundaryToFace, and searchableSurfaceToFaceZone.
Referenced by topoSetSource::mesh().
|
staticprotected |
A table of usage strings.
Definition at line 97 of file topoSetSource.H.
Referenced by NamedEnum< directionType, 3 >::names(), topoSetSource::usage(), and topoSetSource::addToUsageTable::~addToUsageTable().
|
protected |
Definition at line 126 of file topoSetSource.H.
Referenced by normalToFace::applyToSet(), topoSetSource::mesh(), and topoSetSource::toAction().