Go to the documentation of this file.
48 vector(GREAT, GREAT, GREAT),
49 vector(-GREAT, -GREAT, -GREAT)
56 const face&
f = faces[cFaces[cFaceI]];
74 bbs_.setSize(cellLabels_.size());
78 bbs_[i] = calcCellBb(cellLabels_[i]);
95 cellLabels_(cellLabels),
97 decompMode_(decompMode)
112 cellLabels_(cellLabels),
114 decompMode_(decompMode)
128 cellLabels_(
identity(mesh_.nCells())),
130 decompMode_(decompMode)
162 cc[i] = mesh_.cellCentres()[cellLabels_[i]];
177 return cubeBb.
overlaps(bbs_[index]);
181 return cubeBb.
overlaps(calcCellBb(cellLabels_[index]));
192 return mesh_.pointInCell(sample, cellLabels_[index], decompMode_);
196 void Foam::treeDataCell::findNearestOp::operator()
201 scalar& nearestDistSqr,
210 label index = indices[i];
214 if (distSqr < nearestDistSqr)
216 nearestDistSqr = distSqr;
224 void Foam::treeDataCell::findNearestOp::operator()
239 bool Foam::treeDataCell::findIntersectOp::operator()
244 point& intersectionPoint
280 const vector dir(end - start);
281 scalar minDistSqr =
magSqr(dir);
302 intersectionPoint = inter.
hitPoint();
virtual const pointField & points() const
Return raw points.
cellDecomposition
Enumeration defining the decomposition of the cell for.
pointField shapePoints() const
Get representative point cloud for all shapes inside.
bool hit() const
Is there a hit.
const point & max() const
Maximum describing the bounding box.
#define forAll(list, i)
Loop across all elements in list.
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
void update()
Initialise all member data.
static scalar setPlanarTol(const scalar t)
Set the planar tolerance, returning the previous value.
Standard boundBox + extra functionality for use in octree.
const cellList & cells() const
findNearestOp(const indexedOctree< treeDataCell > &tree)
direction posBits(const point &) const
Position of point relative to bounding box.
const polyMesh & mesh() const
treeDataCell(const bool cacheBb, const polyMesh &, const labelUList &, const polyMesh::cellDecomposition decompMode)
Construct from mesh and subset of cells.
A simple container for copying or transferring objects of type <T>.
Mesh consisting of general polyhedral cells.
treeBoundBoxList bbs_
Cell bounding boxes (valid only if cacheBb_)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
scalar distance() const
Return distance to hit.
Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e....
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
treeBoundBox calcCellBb(const label cellI) const
Calculate cell bounding box.
Pre-declare SubField and related Field type.
const labelList & cellLabels() const
Non-pointer based hierarchical recursive searching.
const point & min() const
Minimum describing the bounding box.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
Vector< scalar > vector
A scalar version of the templated Vector.
bool overlaps(const label index, const treeBoundBox &sampleBb) const
Does (bb of) shape at index overlap bb.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const vectorField & cellCentres() const
virtual const faceList & faces() const
Return raw faces.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool contains(const label index, const point &sample) const
Does shape at index contain sample.
const bool cacheBb_
Whether to precalculate and store cell bounding box.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
A face is a list of labels corresponding to mesh vertices.
bool overlaps(const boundBox &) const
Overlaps other bounding box?
findIntersectOp(const indexedOctree< treeDataCell > &tree)
const labelList cellLabels_
Subset of cells to work on.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
A cell is defined as a list of faces with extra functionality.
const Point & hitPoint() const
Return hit point.
dimensioned< scalar > magSqr(const dimensioned< Type > &)