#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
◆ BITS_PER_DIMENSION
#define BITS_PER_DIMENSION 21 /* for Peano-Hilbert order. Note: Maximum is 10 to fit in 32-bit integer ! */ |
◆ DomainFac
◆ PEANOCELLS
◆ peano_t
◆ init_peano_map()
void init_peano_map |
( |
void |
| ) |
|
◆ mysort_peano()
void mysort_peano |
( |
void * |
b, |
|
|
size_t |
n, |
|
|
size_t |
s, |
|
|
int(*)(const void *, const void *) |
cmp |
|
) |
| |
◆ PEANO()
static peano_t PEANO |
( |
double * |
Pos, |
|
|
double |
BoxSize |
|
) |
| |
|
inlinestatic |
Definition at line 14 of file peano.h.
18 const double spos[3] = {Pos[0] + BoxSize/2000, Pos[1] + BoxSize/2000, Pos[2] + BoxSize/2000};
peano_t peano_hilbert_key(int x, int y, int z, int bits)
#define BITS_PER_DIMENSION
References BITS_PER_DIMENSION, DomainFac, and peano_hilbert_key().
Referenced by do_density_test(), do_force_test(), do_tree_test(), init(), real_drift_particle(), and setup_particles().
◆ peano_hilbert_key()
peano_t peano_hilbert_key |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
z, |
|
|
int |
bits |
|
) |
| |
This function computes a Peano-Hilbert key for an integer triplet (x,y,z), with x,y,z in the range between 0 and 2^bits-1.
Definition at line 119 of file peano.c.
122 unsigned char rotation = 0;
125 for(mask = 1 << (bits - 1); mask > 0; mask >>= 1)
127 unsigned char pix = ((x & mask) ? 4 : 0) | ((y & mask) ? 2 : 0) | ((z & mask) ? 1 : 0);
const unsigned char subpix3[48][8]
const unsigned char rottable3[48][8]
References rottable3, and subpix3.
Referenced by force_create_node_for_topnode(), and PEANO().