42 nearestToPoint::typeName,
43 "\n Usage: nearestToPoint (pt0 .. ptn)\n\n" 44 " Select the nearest point for each of the points pt0 ..ptn\n\n" 50 void Foam::nearestToPoint::combine(topoSet&
set,
const bool add)
const 61 scalar minDistSqr =
magSqr(pts[minPointi] - points_[pointi]);
63 for (
label i = 1; i < pts.size(); i++)
65 scalar distSqr =
magSqr(pts[i] - points_[pointi]);
67 if (distSqr < minDistSqr)
74 addOrDelete(
set, minPointi, add);
100 points_(dict.
lookup(
"points"))
131 Info<<
" Adding points nearest to " << points_ <<
endl;
137 Info<<
" Removing points nearest to " << points_ <<
endl;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
nearestToPoint(const polyMesh &mesh, const pointField &points)
Construct from components.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
vectorField pointField
pointField is a vectorField.
setAction
Enumeration defining the valid actions.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
virtual ~nearestToPoint()
Destructor.
Class with constructor to add usage string to table.
Mesh consisting of general polyhedral cells.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.