28 #ifndef __QUADTREE_H__
29 #define __QUADTREE_H__
49 Cquadtree(
double _x,
double _y,
double _half_size_x,
double _half_size_y);
67 int init(
double _x,
double _y,
double _half_size_x,
double _half_size_y);
double half_size_y
HALF size of the cell.
Creference circle_intersect(double cx, double cy, double cR2)
circle intersection.
bool has_child
true if not a leaf
double centre_x
x-position of the centre of the cell
~Cquadtree()
default destructor at destruction, everything is destroyed except physical values at the leaves
base class for dynamic coordinates management
Implementation of a 2D quadtree.
int init(double _x, double _y, double _half_size_x, double _half_size_y)
init the tree.
double half_size_x
HALF size of the cell.
Cquadtree * children[2][2]
sub-cells ( 0,1->left-right; 0,1->bottom,top)
double centre_y
y-position of the centre of the cell
Cmomentum * v
physical contents
int add(Cmomentum *v_add)
adding a particle to the tree.
int save_leaves(FILE *flux)
output a data file for drawing the tree leaves.
references used for checksums.
int save(FILE *flux)
output a data file for drawing the grid.
The
SISCone project has been developed by
Gavin Salam and
Gregory Soyez
Documentation generated for SISCone by
Doxygen 1.8.17