39 scalar inflationFraction
52 if (inflationFraction > SMALL)
64 const labelList& owner = this->faceOwner();
70 label nFace =
f[facei];
73 if (owner[nFace] != celli)
78 if ((normal & proj) > 0)
97 label nearestCelli = 0;
98 scalar minProximity =
magSqr(centres[0] - location);
100 for (label celli = 1; celli < centres.
size(); celli++)
102 scalar proximity =
magSqr(centres[celli] - location);
104 if (proximity < minProximity)
106 nearestCelli = celli;
107 minProximity = proximity;
123 label celli = findNearestCell(location);
126 if (pointInCell(location, celli))
132 bool cellFound =
false;
135 while ((!cellFound) && (
n < nCells()))
137 if (pointInCell(location,
n))
void size(const label n)
Older name for setAddressableSize.
A bounding box defined in terms of min/max extrema points.
bool contains(const point &pt) const
Contains point? (inside or on edge)
void inflate(const scalar s)
Inflate box by factor*mag(span) in all dimensions.
label findNearestCell(const point &location) const
Find the cell with the nearest cell centre to location.
bool pointInCell(const point &p, label celli) const
Return true if the point is in the cell.
virtual const faceList & faces() const =0
Return faces.
bool pointInCellBB(const point &p, label celli, scalar inflationFraction=0) const
Return true if the point in the cell bounding box.
label findCell(const point &location) const
Find cell enclosing this location (-1 if not in mesh)
virtual const pointField & points() const =0
Return mesh points.
const cellList & cells() const
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
#define forAll(list, i)
Loop across all elements in list.