Go to the documentation of this file.
53 bbs_.setSize(edgeLabels_.size());
57 bbs_[i] = calcBb(edgeLabels_[i]);
75 edgeLabels_(edgeLabels),
92 edgeLabels_(edgeLabels),
123 const edge&
e = edges_[edgeLabels_[i]];
125 eMids[i] =
e.centre(points_);
150 const edge&
e = edges_[edgeLabels_[index]];
152 const point& start = points_[
e.start()];
153 const point& end = points_[
e.end()];
166 const scalar radiusSqr
169 const edge&
e = edges_[edgeLabels_[index]];
171 const pointHit nearHit =
e.line(points_).nearestDist(centre);
175 if (distSqr <= radiusSqr)
184 void Foam::treeDataEdge::findNearestOp::operator()
189 scalar& nearestDistSqr,
198 const label index = indices[i];
206 if (distSqr < nearestDistSqr)
208 nearestDistSqr = distSqr;
216 void Foam::treeDataEdge::findNearestOp::operator()
230 scalar nearestDistSqr =
magSqr(linePoint - nearestPoint);
234 const label index = indices[i];
242 scalar dist =
e.line(shape.
points()).nearestDist(
ln, ePoint, lnPt);
243 scalar distSqr =
sqr(dist);
245 if (distSqr < nearestDistSqr)
247 nearestDistSqr = distSqr;
250 nearestPoint = ePoint;
254 minPt =
min(
ln.start(),
ln.end());
261 maxPt =
max(
ln.start(),
ln.end());
271 bool Foam::treeDataEdge::findIntersectOp::operator()
findNearestOp(const indexedOctree< treeDataEdge > &tree)
volumeType getVolumeType(const indexedOctree< treeDataEdge > &, const point &) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
const edgeList & edges_
Reference to edgeList.
const pointField & points_
Reference to points.
treeDataEdge(const bool cacheBb, const edgeList &edges, const pointField &points, const labelUList &edgeLabels)
Construct from selected edges. !Holds references to edges and points.
#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...
const Point & rawPoint() const
Return point with no checking.
Standard boundBox + extra functionality for use in octree.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A simple container for copying or transferring objects of type <T>.
bool overlaps(const label index, const treeBoundBox &sampleBb) const
Does (bb of) shape at index overlap bb.
findIntersectOp(const indexedOctree< treeDataEdge > &tree)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
scalar distance() const
Return distance to hit.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
bool intersects(const point &overallStart, const vector &overallVec, const point &start, const point &end, point &pt, direction &ptBits) const
Intersects segment; set point to intersection position and face,.
const edgeList & edges() const
Non-pointer based hierarchical recursive searching.
Holds data for octree to work on an edges subset.
Raster intersect(const Raster &rast1, const Raster &rast2)
const double e
Elementary charge.
const pointField & points() const
void update()
Initialise all member data.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
pointField shapePoints() const
Get representative point cloud for all shapes inside.
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...
const labelList & edgeLabels() const
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
treeBoundBox calcBb(const label edgeI) const
Calculate edge bounding box.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)