Lagrangian Particle Code for The Simulation of 2D/3D Fluid Dynamics
 All Classes Files Functions Variables Typedefs Friends Pages
Public Member Functions | List of all members
Octree Class Reference

This class contains the Octree data structure and algorithm for nearest neighbour search of particles. More...

#include <octree.h>

Public Member Functions

 Octree (int treedepth, size_t maxParticleNum)
 
int buildOctree (const double *x, const double *y, const double *z, size_t numParticles)
 
int searchNeighbor (const double search_x, const double search_y, const double search_z, const double radius, int *result, size_t &result_length)
 
int searchNeighbor (const double search_x, const double search_y, const double search_z, const double radius, SearchResult *result, size_t &result_length)
 

Detailed Description

This class contains the Octree data structure and algorithm for nearest neighbour search of particles.

This class is very strongly related with its implementation and the data structure of DefaultParticles class. So do not use this class with the general purpose. This class does not have octree search algorithm. The search algorithm is implemented in DefaultParticles and its subclasses. The member fields starting from "m_v" must have same length with DefaultParticles::m_iNumOfParticles and m_iTotalNumberOfParticles. That is, the length of these member field means the total number of particles. Each value of the array represent octree nodes. The location information can be fetched by decoding m_vKey value.

See Also
DefaultParticles

Member Function Documentation

int Octree::buildOctree ( const double *  x,
const double *  y,
const double *  z,
size_t  numParticles 
)

brief Building octree data structure.


The documentation for this class was generated from the following files: