60 patchToCell::typeName,
61 "\n Usage: patchToCell patch\n\n" 62 " Select cells attached to patch. Note:accepts wildcards for patch.\n\n" 68 void 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)
124 const polyMesh&
mesh,
125 const dictionary&
dict 132 if (!
dict.readIfPresent(
"patches", selectedPatches_))
134 selectedPatches_.
resize(1);
136 dict.getCompat<
wordRe>(
"patch", {{
"name", 1806}});
143 const polyMesh&
mesh,
147 topoSetCellSource(
mesh),
164 Info<<
" Adding cells associated with patches: " 174 Info<<
" Removing cells associated with patches: " const labelList patchIDs(pbm.indices(polyPatchNames, true))
void resize(const label len)
Adjust allocated size of list.
bool verbose_
Output verbosity (default: true)
Create a new set and ADD elements to it.
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.
Add elements to current set.
constexpr char nl
The newline '\n' character (0x0a)
T & front()
Access first element of the list, position [0].
Ostream & endl(Ostream &os)
Add newline and flush stream.
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells...
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
Macros for easy insertion into run-time selection tables.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
patchToCell(const polyMesh &mesh, const wordRe &patchName)
Construct from components.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
wordList names() const
Return a list of patch names.
setAction
Enumeration defining various actions.
virtual const labelList & faceOwner() const
Return face owner.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
const polyMesh & mesh_
Reference to the mesh.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
defineTypeNameAndDebug(combustionModel, 0)
Subtract elements from current set.
#define WarningInFunction
Report a warning using Foam::Warning.
Class with constructor to add usage string to table.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
const std::string patch
OpenFOAM patch number as a std::string.
messageStream Info
Information stream (stdout output on master, null elsewhere)
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.