-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfof.h
36 lines (28 loc) · 1.04 KB
/
fof.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef FOF_H
#define FOF_H
#include <stdint.h>
#include "particle.h"
struct fof {
int64_t num_p;
struct particle *particles;
};
struct smallfof {
int64_t root;
};
extern struct particle *root_p;
extern int64_t *particle_smallfofs;
extern struct smallfof *smallfofs;
#define SMALLFOF_OF(a) particle_smallfofs[(a) - root_p]
void init_particle_smallfofs(int64_t num_p, struct particle *particles);
void link_particle_to_fof(struct particle *p, int64_t n, struct particle **links);
void link_fof_to_fof(struct particle *p, int64_t n, struct particle **links);
int64_t tag_boundary_particle(struct particle *p);
void build_fullfofs(void);
struct fof *return_fullfofs(int64_t *num_f, int64_t *num_bf);
void copy_fullfofs(struct fof **base, int64_t *num_f, int64_t *num_alloced_f);
void partition_sort_particles(int64_t min, int64_t max,
struct particle *particles, int64_t *assignments);
int64_t add_new_smallfof(void);
void merge_smallfofs(struct smallfof *f1, struct smallfof *f2);
void _collapse_smallfof(struct smallfof *f);
#endif /* FOF_H */