Go to the documentation of this file.
38 #ifndef BOX_SYSTEM_HEADER
39 #define BOX_SYSTEM_HEADER
68 #define MAX_NO_OF_BOX_LEVELS 30
85 int* resultOrgIndexList)
const;
90 int* resultOrgIndexList,
Treal template_blas_sqrt(Treal x)
ergo_real get_min_distance_from_point_to_box(const ergo_real *boxCenterCoords, ergo_real halfwidth, const ergo_real *point)
Definition: box_system.cc:333
int firstChildBoxIndex
Definition: box_system.h:59
int noOfLevels
Definition: box_system.h:74
Definition of the main floating-point datatype used; the ergo_real type.
int get_items_near_point_recursive(const box_item_struct *itemList, const ergo_real *coords, ergo_real distance, int *resultOrgIndexList, int level, int boxIndex) const
Definition: box_system.cc:352
int originalIndex
Definition: box_system.h:48
Memory allocation/deallocation routines.
int totNoOfBoxes
Definition: box_system.h:73
#define LOG_CAT_ERROR
Definition: output.h:47
double ergo_real
Definition: realtype.h:69
box_struct_basic * boxList
Definition: box_system.h:76
int noOfBoxes
Definition: box_system.h:64
BoxSystem class representing a hierarchical data structure of boxes in 3D space (an oct-tree).
box_level_struct levelList[MAX_NO_OF_BOX_LEVELS]
Definition: box_system.h:75
int noOfItems
Definition: box_system.h:56
Treal template_blas_fabs(Treal x)
ergo_real centerCoords[3]
Definition: box_system.h:54
~BoxSystem()
Definition: box_system.cc:59
int startIndexInBoxList
Definition: box_system.h:65
Definition: box_system.h:46
int firstItemIndex
Definition: box_system.h:57
Basic OS access utilities.
#define LOG_CAT_INFO
Definition: output.h:49
ergo_real centerCoords[3]
Definition: box_system.h:47
#define LOG_AREA_INTEGRALS
Definition: output.h:60
int noOfChildBoxes
Definition: box_system.h:58
Definition: box_system.h:63
Definition: box_system.h:53
Definition: box_system.h:71
int get_items_near_point(const box_item_struct *itemList, const ergo_real *coords, ergo_real distance, int *resultOrgIndexList) const
Goes through existning box system to find all items within specified distance from given reference po...
Definition: box_system.cc:430
BoxSystem()
Definition: box_system.cc:54
ergo_real width
Definition: box_system.h:55
static ergo_real distance(const ergo_real *a, const ergo_real *b)
Coomputes distance between two points, they do not need to be of the Vector3D type.
Definition: dft_common.cc:526
ergo_real get_min_distance_from_point_to_box(const ergo_real *boxCenterCoords, ergo_real halfwidth, const ergo_real *point)
Definition: box_system.cc:333
void do_output(int logCategory, int logArea, const char *format,...)
Definition: output.cc:53
#define MAX_NO_OF_BOX_LEVELS
Definition: box_system.h:68
Functionality for writing output messages to a text file.
static int compare_ints(const void *p1, const void *p2)
Definition: box_system.cc:408
int create_box_system(box_item_struct *itemList, int noOfItems, ergo_real toplevelBoxSize)
Creates the box system.
Definition: box_system.cc:74