48 nearestToPoint::typeName,
49 "\n Usage: nearestToPoint (pt0 .. ptn)\n\n"
50 " Select the nearest point for each of the points pt0 ..ptn\n\n"
56 void Foam::nearestToPoint::combine(topoSet&
set,
const bool add)
const
67 scalar minDistSqr =
magSqr(pts[minPointI] - points_[pointI]);
69 for (label i = 1; i < pts.size(); i++)
71 scalar distSqr =
magSqr(pts[i] - points_[pointI]);
73 if (distSqr < minDistSqr)
108 points_(dict.
lookup(
"points"))
140 Info<<
" Adding points nearest to " << points_ <<
endl;
146 Info<<
" Removing points nearest to " << points_ <<
endl;