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)
87 const dictionary&
dict
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.
virtual ~nearestToPoint()
Destructor.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
nearestToPoint(const polyMesh &mesh, const pointField &points)
Construct from components.
Motion of the mesh specified as a list of pointMeshMovers.
virtual const pointField & points() const
Return raw points.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
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)
void add(GeometricField< typename typeOfSum< Type1, Type2 >::type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type1, GeoMesh, PrimitiveField2 > &gf1, const GeometricField< Type2, GeoMesh, PrimitiveField3 > &gf2)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimLength
vectorField pointField
pointField is a vectorField.
vector point
Point is a vector.
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)