48 pointToCell::typeName,
49 "\n Usage: pointToCell <pointSet> any|edge\n\n"
50 " Select all cells with any point ('any') or any edge ('edge')"
51 " in the pointSet\n\n"
58Foam::pointToCell::pointActionNames_
60 { pointAction::ANY,
"any" },
61 { pointAction::EDGE,
"edge" },
75 pointSet loadedSet(
mesh_, setName);
89 else if (option_ ==
EDGE)
95 const face&
f = faces[facei];
127 names_(
one{}, setName),
140 option_(pointActionNames_.get(
"option",
dict))
158 names_(
one{},
word(checkIs(is))),
159 option_(pointActionNames_.
read(checkIs(is)))
175 Info<<
" Adding cells according to pointSet "
179 for (
const word& setName : names_)
188 Info<<
" Removing cells according to pointSet "
192 for (
const word& setName : names_)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void resize(const label len)
Adjust allocated size of list.
T & first()
Return the first element of the list.
bool found(const T &val, label pos=0) const
True if the value if found in the list.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A topoSetCellSource to select cells with any point or any edge within a given pointSet(s).
pointAction
Enumeration defining the valid options.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
virtual const labelList & faceNeighbour() const
Return face neighbour.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
const labelListList & pointCells() const
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells.
Class with constructor to add usage string to table.
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
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.
const polyMesh & mesh_
Reference to the mesh.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
bool read(const char *buf, int32_t &val)
Same as readInt32.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
List< face > faceList
A List of faces.
constexpr char nl
The newline '\n' character (0x0a)
labelList pointLabels(nPoints, -1)
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.