Go to the documentation of this file.
55 const bool useSubsetPoints
60 useSubset_(useSubsetPoints)
68 const bool useSubsetPoints
73 useSubset_(useSubsetPoints)
122 return cubeBb.
contains(shapePoint(index));
130 const scalar radiusSqr
133 return (
magSqr(shapePoint(index) - centre) <= radiusSqr);
137 void Foam::treeDataPoint::findNearestOp::operator()
142 scalar& nearestDistSqr,
149 for (
const label index : indices)
155 if (distSqr < nearestDistSqr)
157 nearestDistSqr = distSqr;
165 void Foam::treeDataPoint::findNearestOp::operator()
179 scalar nearestDistSqr = GREAT;
182 nearestDistSqr =
magSqr(linePoint - nearestPoint);
185 for (
const label index : indices)
189 if (tightest.contains(shapePt))
195 if (distSqr < nearestDistSqr)
197 nearestDistSqr = distSqr;
200 nearestPoint = shapePt;
204 minPt =
min(
ln.start(),
ln.end());
211 maxPt =
max(
ln.start(),
ln.end());
222 bool Foam::treeDataPoint::findIntersectOp::operator()
const point & shapePoint(const label index) const
Point at specified index.
vectorField pointField
pointField is a vectorField.
const Cmpt & x() const
Access to the vector x component.
findIntersectOp(const indexedOctree< treeDataPoint > &tree)
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
Standard boundBox with extra functionality for use in octree.
scalar distance() const noexcept
Return distance to hit.
treeDataPoint(const pointField &points)
Construct from pointField.
const Cmpt & z() const
Access to the vector z component.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Holds (reference to) pointField. Encapsulation of data needed for octree searches....
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
An enumeration wrapper for classification of a location as being inside/outside of a volume.
pointField shapePoints() const
const point_type & rawPoint() const noexcept
The point, no checks.
Non-pointer based hierarchical recursive searching.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
findNearestOp(const indexedOctree< treeDataPoint > &tree)
const Cmpt & y() const
Access to the vector y component.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
bool overlaps(const label index, const treeBoundBox &sampleBb) const
Does (bb of) shape at index overlap bb.
volumeType getVolumeType(const indexedOctree< treeDataPoint > &os, const point &sample) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
defineTypeNameAndDebug(combustionModel, 0)
labelList pointLabels(nPoints, -1)
Minimal example by using system/controlDict.functions: