25#ifdef DIPOLAR_BARNES_HUT
__global__ float float * torque
void buildBoxBH(int blocks)
Building Barnes-Hut spatial min/max position box.
void setBHPrecision(float epssq, float itolsq)
Barnes-Hut parameters setter.
void energyBH(BHData *bh_data, float k, float *E)
Barnes-Hut energy calculation.
void forceBH(BHData *bh_data, float k, float *f, float *torque)
Barnes-Hut force calculation.
void initBHgpu(int blocks)
Barnes-Hut CUDA initialization.
void summarizeBH(int blocks)
Calculate octant cells masses and cell index counts. Determine cells centers of mass and total dipole...
void deallocBH(BHData *bh_data)
A deallocation of the GPU device memory.
void allocBHmemCopy(int nbodies, BHData *bh_data)
An allocation of the GPU device memory and an initialization where it is needed.
void sortBH(int blocks)
Sort particle indexes according to the Barnes-Hut tree representation. Crucial for the per-warp perfo...
void fill_bh_data(float const *r, float const *dip, BHData const *bh_data)
Copy Barnes-Hut data to bhpara and copy particle data.
void buildTreeBH(int blocks)
Building Barnes-Hut tree in a linear child array representation of octant cells and particles inside.
This file contains the defaults for ESPResSo.
float * r
particle positions on the device:
float * mass
Not a real mass. Just a node weight coefficient.
int nbodies
each node corresponds to a split of the cubic box in 3D space to equal cubic boxes hence,...
int * child
The tree linear representation.
float * maxp
max positions' coordinates of the Barnes-Hut box.
int * sort
Indices of particles sorted according to the tree linear representation.
int * count
Supplementary array: a tree nodes (division octant cells/particles inside) counting.
float * u
particle dipole moments on the device:
float * minp
min positions' coordinates of the Barnes-Hut box.
int * max_lps
trace the max loops for a threads' sync
int * start
Start indices for the per-cell sorting.