60 patchToPoint::typeName,
61 "\n Usage: patchToPoint patch\n\n" 62 " Select all points in the pointPatch." 63 " Note:accepts wildcards for patch.\n\n" 69 void Foam::patchToPoint::combine(topoSet&
set,
const bool add)
const 72 const pointBoundaryMesh&
pbm = pMesh.boundary();
76 pbm.indices(selectedPatches_,
true)
81 const pointPatch&
pp =
pbm[patchi];
85 Info<<
" Found matching patch " <<
pp.name() <<
" with " 89 for (
const label pointi :
pp.meshPoints())
98 <<
"Cannot find any patches matching " 110 const polyMesh&
mesh,
111 const wordRe& patchName
115 selectedPatches_(
one{}, patchName)
121 const polyMesh&
mesh,
122 const dictionary&
dict 125 topoSetPointSource(
mesh),
129 if (!
dict.readIfPresent(
"patches", selectedPatches_))
131 selectedPatches_.
resize(1);
133 dict.getCompat<
wordRe>(
"patch", {{
"name", 1806}});
140 const polyMesh&
mesh,
144 topoSetPointSource(
mesh),
161 Info<<
" Adding all points of patches: " 171 Info<<
" Removing all points of patches: " const labelList patchIDs(pbm.indices(polyPatchNames, true))
const polyBoundaryMesh & pbm
The topoSetPointSource is a intermediate class for handling topoSet sources for selecting points...
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.
static FOAM_NO_DANGLING_REFERENCE const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
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.
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)
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
patchToPoint(const polyMesh &mesh, const wordRe &patchName)
Construct from components.
setAction
Enumeration defining various actions.
Reading is optional [identical to LAZY_READ].
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.
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)
List< label > labelList
A List of labels.
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.