35 #ifndef indexedOctree_H 36 #define indexedOctree_H 53 template<
class Type>
class indexedOctree;
54 template<
class Type> Ostream& operator<<(Ostream&, const indexedOctree<Type>&);
72 public indexedOctreeName
126 static scalar perturbTol_;
152 const scalar nearestDistSqr,
186 static label compactContents
190 const label compactLevel,
208 template<
class FindNearestOp>
215 label& nearestShapeI,
219 const FindNearestOp& fnOp
225 const label parentNodeI,
231 static point pushPoint
235 const bool pushInside
240 static point pushPoint
245 const bool pushInside
253 static point pushPointIntoFace
287 template<
class FindIntersectOp>
291 const point& treeStart,
302 const FindIntersectOp& fiOp
306 template<
class FindIntersectOp>
310 const point& treeStart,
311 const point& treeEnd,
312 const label startNodeI,
314 const FindIntersectOp& fiOp,
315 const bool verbose =
false 319 template<
class FindIntersectOp>
325 const FindIntersectOp& fiOp
342 const scalar radiusSqr,
347 template<
class CompareOp>
350 const scalar nearDist,
423 const label maxLevels,
424 const scalar maxLeafRatio,
425 const scalar maxDuplicity
446 const Type&
shapes()
const 472 return nodes_[0].bb_;
524 const scalar nearestDistSqr
532 template<
class FindNearestOp>
536 const scalar nearestDistSqr,
538 const FindNearestOp& fnOp
542 template<
class FindNearestOp>
548 scalar& nearestDistSqr,
549 label& nearestShapeI,
552 const FindNearestOp& fnOp
569 template<
class FindNearestOp>
576 const FindNearestOp& fnOp
594 template<
class FindIntersectOp>
599 const FindIntersectOp& fiOp
603 template<
class FindIntersectOp>
608 const FindIntersectOp& fiOp
621 const scalar radiusSqr
644 const vector& outsideNormal,
654 const scalar nearestDistSqr,
660 template<
class CompareOp>
663 const scalar nearDist,
676 const bool printContents,
void divide(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
bool empty() const
Return true if the UList is empty (ie, size() is zero)
treeBoundBox bb_
Bounding box of this node.
static direction getOctant(const labelBits i)
A 1D vector of objects of type <T> with a fixed size <Size>.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
pointIndexHit findLineAny(const point &start, const point &end) const
Find any intersection of line between start and end.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static bool isEmpty(const labelBits i)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const labelListList & contents() const
List of all contents (referenced by those nodes that are.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
static scalar & perturbTol()
Get the perturbation tolerance.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
label parent_
Parent node (index into nodes_ of tree)
static volumeType getSide(const vector &outsideNormal, const vector &vec)
Helper function to return the side. Returns outside if.
const List< node > & nodes() const
List of all nodes.
static bool isNode(const labelBits i)
labelBits findNode(const label nodeI, const point &) const
Find deepest node (as parent+octant) containing point. Starts.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Version of OSstream which prints a prefix on each line.
A class for handling words, derived from string.
TemplateName(FvFaceCellWave)
const Type & shapes() const
Reference to shape.
const treeBoundBox & bb() const
Top bounding box.
errorManip< error > abort(error &err)
Tree node. Has up pointer and down pointers.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
indexedOctree(const Type &shapes)
Construct null.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
friend bool operator!=(const node &a, const node &b)
void print(prefixOSstream &, const bool printContents, const label) const
Print tree. Either print all indices (printContent = true) or.
static bool isContent(const labelBits i)
label findInside(const point &) const
Find shape containing point. Only implemented for certain.
label facePoint(const int facei, const block &block, const label i, const label j)
autoPtr< indexedOctree< Type > > clone() const
Clone.
static label getContent(const labelBits i)
friend bool operator==(const node &a, const node &b)
const labelList & findIndices(const point &) const
Find the shape indices that occupy the result of findNode.
Non-pointer based hierarchical recursive searching.
static label getNode(const labelBits i)
FixedList< labelBits, 8 > subNodes_
IDs of the 8 nodes on all sides of the mid point.
Standard boundBox + extra functionality for use in octree.
A 29bits label and 3bits direction packed into single label.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
friend Istream & operator>>(Istream &is, node &n)
friend Ostream & operator<<(Ostream &os, const node &n)
bool write(Ostream &os) const