40 void Foam::treeDataCell::update()
51 mesh_.
cells()[cellLabels_[i]].bb
72 cellLabels_(cellLabels),
87 cellLabels_(move(cellLabels)),
149 return cubeBb.
overlaps(bbs_[index]);
155 mesh_.
cells()[cellLabels_[index]].bb
176 void Foam::treeDataCell::findNearestOp::operator()
181 scalar& nearestDistSqr,
190 label index = indices[i];
194 if (distSqr < nearestDistSqr)
196 nearestDistSqr = distSqr;
204 void Foam::treeDataCell::findNearestOp::operator()
219 bool Foam::treeDataCell::findIntersectOp::operator()
224 point& intersectionPoint
244 shape.mesh_.
cells()[shape.cellLabels_[index]].bb
265 const cell& cFaces = shape.mesh_.
cells()[shape.cellLabels_[index]];
267 const vector dir(end - start);
268 scalar minDistSqr =
magSqr(dir);
273 const face&
f = shape.mesh_.
faces()[cFaces[i]];
289 intersectionPoint = inter.
hitPoint();
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
const Point & hitPoint() const
Return hit point.
scalar distance() const
Return distance to hit.
bool hit() const
Is there a hit.
A cell is defined as a list of faces with extra functionality.
A face is a list of labels corresponding to mesh vertices.
Non-pointer based hierarchical recursive searching.
static scalar setPlanarTol(const scalar t)
Set the planar tolerance, returning the previous value.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const pointField & points() const
Return raw points.
const vectorField & cellCentres() const
const cellList & cells() const
Standard boundBox + extra functionality for use in octree.
bool overlaps(const boundBox &) const
Overlaps other bounding box?
direction posBits(const point &) const
Position of point relative to bounding box.
findIntersectOp(const indexedOctree< treeDataCell > &tree)
findNearestOp(const indexedOctree< treeDataCell > &tree)
Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e....
bool overlaps(const label index, const treeBoundBox &sampleBb) const
Does (bb of) shape at index overlap bb.
treeDataCell(const bool cacheBb, const polyMesh &, const labelUList &)
Construct from mesh and subset of cells.
bool contains(const label index, const point &sample, const pointInCellShapes) const
Does shape at index contain sample?
const labelList & cellLabels() const
const polyMesh & mesh() const
pointField shapePoints() const
Get representative point cloud for all shapes inside.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
const cellShapeList & cellShapes
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
pointInCellShapes
Enumeration for the sub-shapes used to perform the inside calculation.
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
bool pointInCell(const point &p, const polyMesh &mesh, const label celli, const pointInCellShapes=pointInCellShapes::tets)
Test if a point is in a given cell.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.