41 void Foam::nearestToPoint::combine(topoSet&
set,
const bool add)
const 52 scalar minDistSqr =
magSqr(pts[minPointi] - points_[pointi]);
54 for (
label i = 1; i < pts.size(); i++)
56 scalar distSqr =
magSqr(pts[i] - points_[pointi]);
58 if (distSqr < minDistSqr)
65 addOrDelete(
set, minPointi, add);
91 points_(dict.
lookup(
"points"))
111 Info<<
" Adding points nearest to " << points_ <<
endl;
117 Info<<
" Removing points nearest to " << points_ <<
endl;
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > 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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
Mesh consisting of general polyhedral cells.
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.