Memosa-FVM
0.2
|
#include <Octree.h>
Classes | |
struct | Bounds |
struct | Point |
Public Types | |
typedef double | T |
typedef Array< T > | TArray |
typedef Vector< T, 3 > | VectorT3 |
typedef Array< VectorT3 > | VectorT3Array |
Public Member Functions | |
Octree () | |
virtual | ~Octree () |
shared_ptr< ArrayBase > | getArrayPtr (const VectorT3Array &) |
virtual bool | build (Point *points, const unsigned int count, const unsigned int threshold, const unsigned int maximumDepth, const Bounds &bounds, const unsigned int currentDepth=0) |
const Bounds | calcCubicBounds (const Point *points, const unsigned int count) |
bool | report (FILE *fp) |
const int | getNode (const double x, const double y, const double z) |
const int | getNode (const VectorT3 coordinate) |
const int | getNode (const VectorT3 coordinate, double &shortestDistance) |
Get an object closest to a x/y/z. If there are branches at this node, then the branches are searched. The branches are checked first, to see if they are closer than the best distance already found. If a closer object is found, bestDistance will be updated with a new Double object that has the new distance. More... | |
const double | borderDistance (const VectorT3 coordinate) |
A utility method to figure out the closest distance of a border to a point. If the point is inside the bounds, return 0.
| |
void | getNodes (const VectorT3 coordinate, const double radius, vector< int > &cellList) |
Get all objects closest to a x/y/z within a radius. search mechanism similar to getNode(coordinate) More... | |
void | getNodes (const double x, const double y, const double z, const double radius, vector< int > &cellList) |
const int | Naive_getNode (const VectorT3 coordinate, const int count, const Point *points) |
Get all objects closest to a x/y/z within a radius. by simply looping over all the points More... | |
const vector< int > | Naive_getNodes (const VectorT3 coordinate, const int count, const Point *points, const double radius) |
void | Impl (const Mesh &mesh, const GeomFields &geomFields) |
void | Create (const Mesh &mesh, const GeomFields &geomFields, const int faceGroupID) |
Protected Attributes | |
Octree * | _child [8] |
unsigned int | _pointCount |
Point * | _points |
VectorT3 | _center |
T | _radius |
unsigned int | _nodeType |
int | _currentDepth |
typedef Array<T> Octree::TArray |
typedef Vector<T,3> Octree::VectorT3 |
typedef Array<VectorT3> Octree::VectorT3Array |
Octree::Octree | ( | ) |
Definition at line 31 of file Octree.cpp.
|
virtual |
Definition at line 45 of file Octree.cpp.
const double Octree::borderDistance | ( | const VectorT3 | coordinate | ) |
A utility method to figure out the closest distance of a border to a point. If the point is inside the bounds, return 0.
Definition at line 342 of file Octree.cpp.
|
virtual |
Definition at line 56 of file Octree.cpp.
References Octree::Bounds::center, Octree::Point::code, Octree::Point::coordinate, and Octree::Bounds::radius.
Referenced by Create(), and Impl().
const Octree::Bounds Octree::calcCubicBounds | ( | const Point * | points, |
const unsigned int | count | ||
) |
Definition at line 255 of file Octree.cpp.
References Octree::Bounds::center, Octree::Point::coordinate, max(), min(), and Octree::Bounds::radius.
Referenced by Create(), and Impl().
void Octree::Create | ( | const Mesh & | mesh, |
const GeomFields & | geomFields, | ||
const int | faceGroupID | ||
) |
Definition at line 593 of file Octree.cpp.
References build(), calcCubicBounds(), Octree::Point::cellIndex, Octree::Point::code, GeomFields::coordinate, Octree::Point::coordinate, Mesh::getBoundaryFaceGroups(), StorageSite::getCount(), FaceGroup::id, and FaceGroup::site.
shared_ptr<ArrayBase> Octree::getArrayPtr | ( | const VectorT3Array & | ) |
const int Octree::getNode | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
Definition at line 441 of file Octree.cpp.
Referenced by CellMark_Impl(), and getNode().
const int Octree::getNode | ( | const VectorT3 | coordinate | ) |
Definition at line 453 of file Octree.cpp.
References getNode().
const int Octree::getNode | ( | const VectorT3 | coordinate, |
double & | shortestDistance | ||
) |
Get an object closest to a x/y/z. If there are branches at this node, then the branches are searched. The branches are checked first, to see if they are closer than the best distance already found. If a closer object is found, bestDistance will be updated with a new Double object that has the new distance.
Definition at line 387 of file Octree.cpp.
References mag2(), and sqrt().
void Octree::getNodes | ( | const VectorT3 | coordinate, |
const double | radius, | ||
vector< int > & | cellList | ||
) |
Get all objects closest to a x/y/z within a radius. search mechanism similar to getNode(coordinate)
Definition at line 466 of file Octree.cpp.
References mag2().
Referenced by CellMark_Impl(), and getNodes().
void Octree::getNodes | ( | const double | x, |
const double | y, | ||
const double | z, | ||
const double | radius, | ||
vector< int > & | cellList | ||
) |
Definition at line 501 of file Octree.cpp.
References getNodes().
void Octree::Impl | ( | const Mesh & | mesh, |
const GeomFields & | geomFields | ||
) |
Definition at line 557 of file Octree.cpp.
References build(), calcCubicBounds(), Octree::Point::cellIndex, Octree::Point::code, GeomFields::coordinate, Octree::Point::coordinate, Mesh::getCells(), and StorageSite::getCount().
const int Octree::Naive_getNode | ( | const VectorT3 | coordinate, |
const int | count, | ||
const Point * | points | ||
) |
Get all objects closest to a x/y/z within a radius. by simply looping over all the points
Definition at line 516 of file Octree.cpp.
References Octree::Point::cellIndex, Octree::Point::coordinate, mag2(), and sqrt().
const vector< int > Octree::Naive_getNodes | ( | const VectorT3 | coordinate, |
const int | count, | ||
const Point * | points, | ||
const double | radius | ||
) |
bool Octree::report | ( | FILE * | fp | ) |
Definition at line 309 of file Octree.cpp.