41#ifndef Foam_topoSetSource_H
42#define Foam_topoSetSource_H
301 static const string&
usage(
const word&
name)
334 const word& topoSetSourceType,
342 const word& topoSetSourceType,
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A HashTable similar to std::unordered_map.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
Class with constructor to add usage string to table.
addToUsageTable(const word &name, const string &msg)
Class used for the read-construction of.
iNew(const polyMesh &mesh)
autoPtr< topoSetSource > operator()(Istream &is) const
static bool isZoneSource(const sourceType t) noexcept
True if a "zone" source.
virtual sourceType setType() const =0
The source category (cell/face/point combined with set/zone).
static bool isPoint(const sourceType t) noexcept
True if "point" geometric type.
static const string illegalSource_
bool hasTransform() const noexcept
True if coordinate transform is active.
sourceType
Enumeration defining the types of sources.
@ CELL_TYPE
Geometric type is "cell".
@ POINTSET_SOURCE
Points as set.
@ FACESET_SOURCE
Faces as set.
@ FACEZONE_SOURCE
Faces as zone.
@ UNKNOWN_SOURCE
Placeholder.
@ POINTZONE_SOURCE
Points as zone.
@ CELLSET_SOURCE
Cells as set.
@ CELLZONE_SOURCE
Cells as zone.
@ POINT_TYPE
Geometric type is "point".
@ ZONE_SOURCE
A source based on mesh zone.
@ FACE_TYPE
Geometric type is "face".
@ SET_SOURCE
A source based on topoSet.
tmp< pointField > transform(const pointField &points) const
Coordinate transform (optionally) coordinates. Returns reference to input data if no transform is act...
static bool readNames(const dictionary &dict, wordList &names)
Helper: extract wordList of patches/zones from dictionary. Returns.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
static bool check(labelList &list, const label maxLabel)
Detect and remove any values less than 0 or ge maxLabel.
static setAction toAction(const word &actionName)
Deprecated(2018-07) convert string to action.
topoSetSource(const topoSetSource &)=delete
No copy construct.
static bool isCell(const sourceType t) noexcept
True if "cell" geometric type.
autoPtr< solidBodyMotionFunction > transformPtr_
Optional transformation for geometric data.
setAction
Enumeration defining various actions.
@ CLEAR
Clear the set, possibly creating it.
@ SUBSET
Union of elements with current set.
@ LIST
Print contents of the set.
@ REMOVE
Remove the set (from the file system).
@ IGNORE
"ignore" no-op action
@ SUBTRACT
Subtract elements from current set.
@ INVERT
Invert the elements in the current set.
@ ADD
Add elements to current set.
@ NEW
Create a new set and ADD elements to it.
static bool isFace(const sourceType t) noexcept
True if "face" geometric type.
void operator=(const topoSetSource &)=delete
No copy assignment.
virtual ~topoSetSource()=default
Destructor.
static HashTable< string > * usageTablePtr_
A table of usage strings.
static const string & usage(const word &name)
declareRunTimeSelectionTable(autoPtr, topoSetSource, word,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
declareRunTimeSelectionTable(autoPtr, topoSetSource, istream,(const polyMesh &mesh, Istream &is),(mesh, is))
bool verbose_
Output verbosity (default: true).
autoPtr< topoSetSource > clone() const
Clone (disallowed).
bool verbose(bool on) noexcept
Enable/disable verbose output.
bool verbose() const noexcept
Get output verbosity.
const polyMesh & mesh() const noexcept
Reference to the mesh.
static autoPtr< topoSetSource > New(const word &topoSetSourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected topoSetSource.
TypeName("topoSetSource")
Runtime type information.
const polyMesh & mesh_
Reference to the mesh.
static Istream & checkIs(Istream &is)
Check state of stream.
static const Enum< setAction > actionNames
The setActions enum text. Names: "new", add", "subtract", "subset", "invert","clear",...
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const =0
Apply specified action to the topoSet.
static const Enum< setAction > combineNames
The setAction enum text when combining selections. Names: "use", "add", "subtract",...
static bool isSetSource(const sourceType t) noexcept
True if a "set" source.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from Foam::string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
List< word > wordList
List of word.
List< label > labelList
A List of labels.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.