60 patchToCell::typeName,
61 "\n Usage: patchToCell patch\n\n"
62 " Select cells attached to patch. Note:accepts wildcards for patch.\n\n"
77 for (
const label patchi : patchIDs)
83 Info<<
" Found matching patch " << pp.name()
84 <<
" with " << pp.size() <<
" faces." <<
endl;
89 label facei = pp.start();
90 facei < pp.start() + pp.size();
101 <<
"Cannot find any patches matching "
118 selectedPatches_(
one{}, patchName)
134 selectedPatches_.
resize(1);
135 selectedPatches_.
first() =
148 selectedPatches_(
one{},
wordRe(checkIs(is)))
164 Info<<
" Adding cells associated with patches "
174 Info<<
" Removing cells associated with patches "
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
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.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getCompat(const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt=keyType::REGEX) const
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) 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 associated with given patch(es).
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
wordList names() const
Return a list of patch names.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
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.
bool verbose_
Output verbosity (default: true)
const polyMesh & mesh_
Reference to the mesh.
General set of labels of mesh quantity (points, cells, faces).
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
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.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
constexpr char nl
The newline '\n' character (0x0a)
dict add("bounds", meshBb)