48 pointToCell::typeName,
49 "\n Usage: pointToCell <pointSet> any|edge\n\n"
50 " Select all cells with any point ('any') or any edge ('edge')"
51 " in the pointSet\n\n"
56 Foam::pointToCell::pointAction
58 Foam::pointToCell::pointActionNames_
60 { pointAction::ANY,
"any" },
61 { pointAction::EDGE,
"edge" },
75 pointSet loadedSet(mesh_, setName);
84 const labelList& pCells = mesh_.pointCells()[pointi];
86 addOrDelete(set, pCells,
add);
89 else if (option_ == EDGE)
91 const faceList& faces = mesh_.faces();
95 const face&
f = faces[facei];
105 addOrDelete(set, mesh_.faceOwner()[facei],
add);
106 if (mesh_.isInternalFace(facei))
108 addOrDelete(set, mesh_.faceNeighbour()[facei],
add);
119 Foam::pointToCell::pointToCell
121 const polyMesh&
mesh,
123 const pointAction option
126 topoSetCellSource(
mesh),
127 names_(one(), setName),
132 Foam::pointToCell::pointToCell
134 const polyMesh&
mesh,
135 const dictionary&
dict
138 topoSetCellSource(
mesh),
140 option_(pointActionNames_.get(
"option",
dict))
143 if (!
dict.readIfPresent(
"sets", names_))
146 dict.readEntry(
"set", names_.first());
151 Foam::pointToCell::pointToCell
153 const polyMesh&
mesh,
157 topoSetCellSource(
mesh),
158 names_(one(), word(checkIs(is))),
159 option_(pointActionNames_.
read(checkIs(is)))
165 void Foam::pointToCell::applyToSet
175 Info<<
" Adding cells according to pointSet "
179 for (
const word& setName : names_)
188 Info<<
" Removing cells according to pointSet "
192 for (
const word& setName : names_)