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)
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.
Macros for easy insertion into run-time selection tables.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list of keyword definitions, which are a keyword followed by any number of values (e....
A topoSetSource to select points nearest to points.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
virtual ~nearestToPoint()
Destructor.
nearestToPoint(const polyMesh &mesh, const pointField &points)
Construct from components.
Mesh consisting of general polyhedral cells.
virtual const pointField & points() const
Return raw points.
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label celli, const bool) const
Add (if bool) celli to set or delete celli from set.
setAction
Enumeration defining the valid actions.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimLength
vectorField pointField
pointField is a vectorField.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
defineTypeNameAndDebug(combustionModel, 0)
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
dimensioned< scalar > magSqr(const dimensioned< Type > &)