ASCOT5
Loading...
Searching...
No Matches
octree.h
Go to the documentation of this file.
1
5#ifndef OCTREE_H
6#define OCTREE_H
7
8#include "ascot5.h"
9#include "list.h"
10
30
31void octree_create(octree_node** node, real x_min, real x_max,
32 real y_min, real y_max, real z_min, real z_max,
33 int depth);
34void octree_free(octree_node** node);
35void octree_add(octree_node* node, real t1[3], real t2[3], real t3[3], int id);
37
38#endif
Main header file for ASCOT5.
double real
Definition ascot5.h:85
Header file for list.c.
struct octree_node octree_node
Struct representing single octree node.
void octree_add(octree_node *node, real t1[3], real t2[3], real t3[3], int id)
Add triangle to the node(s) it belongs to.
Definition octree.c:123
void octree_free(octree_node **node)
Free octree node and all its child nodes.
Definition octree.c:91
void octree_create(octree_node **node, real x_min, real x_max, real y_min, real y_max, real z_min, real z_max, int depth)
Create octree of given depth.
Definition octree.c:46
list_int_node * octree_get(octree_node *node, real p[3])
Get that leaf node's linked list the given coordinate belongs to.
Definition octree.c:164
Linked list node that stores int data.
Definition list.h:12
Struct representing single octree node.
Definition octree.h:17
struct octree_node * n100
Definition octree.h:19
struct octree_node * n111
Definition octree.h:25
struct octree_node * n101
Definition octree.h:23
struct octree_node * n110
Definition octree.h:21
struct octree_node * n010
Definition octree.h:20
struct octree_node * n000
Definition octree.h:18
struct octree_node * n001
Definition octree.h:22
struct octree_node * n011
Definition octree.h:24
list_int_node * list
Definition octree.h:28
real bb2[3]
Definition octree.h:27
real bb1[3]
Definition octree.h:26