60 patchToCell::typeName,
61 "\n Usage: patchToCell patch\n\n"
62 " Select cells attached to patch. Note:accepts wildcards for patch.\n\n"
77 for (
const label patchi : patchIDs)
79 const polyPatch& pp = mesh_.boundaryMesh()[patchi];
83 Info<<
" Found matching patch " << pp.name()
84 <<
" with " << pp.size() <<
" faces." <<
endl;
89 label facei = pp.start();
90 facei < pp.start() + pp.size();
94 addOrDelete(set, mesh_.faceOwner()[facei],
add);
101 <<
"Cannot find any patches matching "
103 <<
"Valid names are " <<
flatOutput(mesh_.boundaryMesh().names())
111 Foam::patchToCell::patchToCell
113 const polyMesh&
mesh,
114 const wordRe& patchName
117 topoSetCellSource(
mesh),
118 selectedPatches_(one(), patchName)
122 Foam::patchToCell::patchToCell
124 const polyMesh&
mesh,
125 const dictionary&
dict
128 topoSetCellSource(
mesh),
132 if (!
dict.readIfPresent(
"patches", selectedPatches_))
134 selectedPatches_.resize(1);
135 selectedPatches_.first() =
136 dict.getCompat<wordRe>(
"patch", {{
"name", 1806}});
141 Foam::patchToCell::patchToCell
143 const polyMesh&
mesh,
147 topoSetCellSource(
mesh),
148 selectedPatches_(one(), wordRe(checkIs(is)))
154 void Foam::patchToCell::applyToSet
164 Info<<
" Adding cells associated with patches "
174 Info<<
" Removing cells associated with patches "