51 scalar inflationFraction
54 boundBox bb(cellBb(celli));
56 if (inflationFraction > SMALL)
58 bb.inflate(inflationFraction);
61 return bb.contains(
p);
68 const labelList& owner = this->faceOwner();
74 label nFace =
f[facei];
77 if (owner[nFace] != celli)
82 if ((normal & proj) > 0)
101 label nearestCelli = 0;
102 scalar minProximity =
magSqr(centres[0] - location);
104 for (label celli = 1; celli < centres.size(); celli++)
106 scalar proximity =
magSqr(centres[celli] - location);
108 if (proximity < minProximity)
110 nearestCelli = celli;
111 minProximity = proximity;
127 label celli = findNearestCell(location);
130 if (pointInCell(location, celli))
136 bool cellFound =
false;
139 while ((!cellFound) && (
n < nCells()))
141 if (pointInCell(location,
n))
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.
A bounding box defined in terms of min/max extrema points.
const cellList & cells() const
bool pointInCell(const point &p, label celli) const
Return true if the point is in the cell.
#define forAll(list, i)
Loop across all elements in list.
bool hasCellPoints() const noexcept
vector point
Point is a vector.
virtual const faceList & faces() const =0
Return faces.
label findNearestCell(const point &location) const
Find the cell with the nearest cell centre to location.
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< label > labelList
A List of labels.
boundBox cellBb(const label celli) const
The bounding box for given cell index.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
const labelListList & cellPoints() const
bool pointInCellBB(const point &p, label celli, scalar inflationFraction=0) const
Return true if the point in the cell bounding box.