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 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 " 113 const polyMesh&
mesh,
114 const wordRe& patchName
118 selectedPatches_(
one{}, patchName)
124 const polyMesh&
mesh,
125 const dictionary&
dict 128 topoSetCellSource(
mesh),
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 polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
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.
Add elements to current set.
constexpr char nl
The newline '\n' character (0x0a)
T & first()
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...
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.
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)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
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)
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.
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.