Go to the documentation of this file.
51 vector(GREAT, GREAT, GREAT),
52 vector(-GREAT, -GREAT, -GREAT)
55 const cell& cFaces =
cells[celli];
59 const face&
f = faces[cFaces[cFacei]];
65 cellBb.min() =
min(cellBb.min(),
p);
66 cellBb.max() =
max(cellBb.max(),
p);
73 void Foam::treeDataCell::update()
77 bbs_.setSize(cellLabels_.size());
81 bbs_[i] = calcCellBb(cellLabels_[i]);
98 cellLabels_(cellLabels),
100 decompMode_(decompMode)
115 cellLabels_(std::move(cellLabels)),
117 decompMode_(decompMode)
131 cellLabels_(
identity(mesh_.nCells())),
133 decompMode_(decompMode)
165 cc[i] = mesh_.cellCentres()[cellLabels_[i]];
180 return cubeBb.
overlaps(bbs_[index]);
183 return cubeBb.
overlaps(calcCellBb(cellLabels_[index]));
193 return mesh_.pointInCell(
sample, cellLabels_[index], decompMode_);
197 void Foam::treeDataCell::findNearestOp::operator()
202 scalar& nearestDistSqr,
211 label index = indices[i];
215 if (distSqr < nearestDistSqr)
217 nearestDistSqr = distSqr;
225 void Foam::treeDataCell::findNearestOp::operator()
240 bool Foam::treeDataCell::findIntersectOp::operator()
245 point& intersectionPoint
263 const treeBoundBox cellBb = shape.calcCellBb(shape.cellLabels_[index]);
279 const cell& cFaces = shape.mesh_.
cells()[shape.cellLabels_[index]];
282 scalar minDistSqr =
magSqr(dir);
287 const face&
f = shape.mesh_.
faces()[cFaces[i]];
303 intersectionPoint = inter.
hitPoint();
vectorField pointField
pointField is a vectorField.
virtual const pointField & points() const
Return raw points.
bool overlaps(const boundBox &bb) const
Overlaps other bounding box?
cellDecomposition
Enumeration defining the decomposition of the cell for.
pointField shapePoints() const
Get representative point cloud for all shapes inside.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
static scalar setPlanarTol(const scalar t)
Set the planar tolerance, returning the previous value.
Standard boundBox with extra functionality for use in octree.
const cellList & cells() const
findNearestOp(const indexedOctree< treeDataCell > &tree)
scalar distance() const noexcept
Return distance to hit.
const polyMesh & mesh() const
const point_type & hitPoint() const
Return the hit point. Fatal if not hit.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
direction posBits(const point &pt) const
Position of point relative to bounding box.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e....
const labelList & cellLabels() const
List< cell > cellList
A List of cells.
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.
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.
const vectorField & cellCentres() const
virtual const faceList & faces() const
Return raw faces.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
treeDataCell(const bool cacheBb, const polyMesh &mesh, const labelUList &cellLabels, const polyMesh::cellDecomposition decompMode)
Construct from mesh, copying subset of cells.
List< face > faceList
A List of faces.
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
bool contains(const label index, const point &sample) const
Does shape at index contain sample.
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.
findIntersectOp(const indexedOctree< treeDataCell > &tree)
vector point
Point is a vector.
defineTypeNameAndDebug(combustionModel, 0)
bool hit() const noexcept
Is there a hit.
A cell is defined as a list of faces with extra functionality.
Minimal example by using system/controlDict.functions: