61 patchToFace::typeName,
62 "\n Usage: patchToFace patch\n\n"
63 " Select all faces in the patch. Note:accepts wildcards for patch.\n\n"
78 for (
const label patchi : patchIDs)
80 const polyPatch& pp = mesh_.boundaryMesh()[patchi];
84 Info<<
" Found matching patch " << pp.name()
85 <<
" with " << pp.size() <<
" faces." <<
endl;
90 label facei = pp.start();
91 facei < pp.start() + pp.size();
95 addOrDelete(set, facei,
add);
102 <<
"Cannot find any patches matching "
104 <<
"Valid names are " <<
flatOutput(mesh_.boundaryMesh().names())
112 Foam::patchToFace::patchToFace
114 const polyMesh&
mesh,
115 const wordRe& patchName
118 topoSetFaceSource(
mesh),
119 selectedPatches_(one(), patchName)
123 Foam::patchToFace::patchToFace
125 const polyMesh&
mesh,
126 const dictionary&
dict
129 topoSetFaceSource(
mesh),
133 if (!
dict.readIfPresent(
"patches", selectedPatches_))
135 selectedPatches_.resize(1);
136 selectedPatches_.first() =
137 dict.getCompat<wordRe>(
"patch", {{
"name", 1806}});
142 Foam::patchToFace::patchToFace
144 const polyMesh&
mesh,
148 topoSetFaceSource(
mesh),
149 selectedPatches_(one(), wordRe(checkIs(is)))
155 void Foam::patchToFace::applyToSet
165 Info<<
" Adding all faces of patches "
175 Info<<
" Removing all faces of patches "