60 patchToCell::typeName,
61 "\n Usage: patchToCell patch\n\n"
62 " Select cells attached to patch. Note:accepts wildcards for patch.\n\n"
68void Foam::patchToCell::combine(topoSet& set,
const bool add)
const
83 Info<<
" Found matching patch " <<
pp.name() <<
" with "
89 label facei =
pp.start();
90 facei <
pp.start() +
pp.size();
101 <<
"Cannot find any patches matching "
113 const polyMesh&
mesh,
114 const wordRe& patchName
118 selectedPatches_(
one{}, patchName)
132 if (!
dict.readIfPresent(
"patches", selectedPatches_))
134 selectedPatches_.resize(1);
135 selectedPatches_.front() =
136 dict.getCompat<wordRe>(
"patch", {{
"name", 1806}});
143 const polyMesh&
mesh,
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.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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).
patchToCell(const polyMesh &mesh, const wordRe &patchName)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
labelHashSet patchSet(const UList< wordRe > &select, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells.
topoSetCellSource(const polyMesh &mesh)
Construct from mesh.
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() const noexcept
Reference to the mesh.
const polyMesh & mesh_
Reference to the mesh.
static Istream & checkIs(Istream &is)
Check state of stream.
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.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
messageStream Info
Information stream (stdout output on master, null elsewhere).
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
constexpr char nl
The newline '\n' character (0x0a).
dict add("bounds", meshBb)