61 patchToFace::typeName,
62 "\n Usage: patchToFace patch\n\n" 63 " Select all faces in the patch. Note:accepts wildcards for patch.\n\n" 69 void Foam::patchToFace::combine(topoSet&
set,
const bool add)
const 84 Info<<
" Found matching patch " <<
pp.name() <<
" with " 88 for (
const label facei :
pp.range())
97 <<
"Cannot find any patches matching " 109 const polyMesh&
mesh,
110 const wordRe& patchName
114 selectedPatches_(
one{}, patchName)
120 const polyMesh&
mesh,
121 const dictionary&
dict 128 if (!
dict.readIfPresent(
"patches", selectedPatches_))
130 selectedPatches_.
resize(1);
132 dict.getCompat<
wordRe>(
"patch", {{
"name", 1806}});
139 const polyMesh&
mesh,
143 topoSetFaceSource(
mesh),
160 Info<<
" Adding all faces of patches: " 170 Info<<
" Removing all faces of 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.
patchToFace(const polyMesh &mesh, const wordRe &patchName)
Construct from components.
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.
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.
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces...
wordList names() const
Return a list of patch names.
setAction
Enumeration defining various actions.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
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.
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.