42 sphereToCell::typeName,
43 "\n Usage: sphereToCell (centreX centreY centreZ) radius\n\n"
44 " Select all cells with cellCentre within bounding sphere\n\n"
50 void Foam::sphereToCell::combine(topoSet&
set,
const bool add)
const
54 const scalar radSquared = radius_*radius_;
58 scalar offset =
magSqr(centre_ - ctrs[cellI]);
59 if (offset <= radSquared)
89 centre_(dict.
lookup(
"centre")),
102 centre_(checkIs(is)),
123 Info<<
" Adding cells with centre within sphere, with centre = "
124 << centre_ <<
" and radius = " << radius_ <<
endl;
130 Info<<
" Removing cells with centre within sphere, with centre = "
131 << centre_ <<
" and radius = " << radius_ <<
endl;