-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathread_ahf.h
50 lines (38 loc) · 1003 Bytes
/
read_ahf.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#define MINPART 50000
#define MAXSTRING 4096
#define pow2(x) ((x)*(x))
#define pow3(x) ((x)*(x)*(x))
// Structs
typedef struct HALO *HALOptr;
typedef struct HALO
{
long npart;
/* read_halos() will convert lengths into grid units [0,LGRID-1]!
LC 1/1/21 I don't think it does!
*/
long haloID;
double Xc;
double Yc;
double Zc;
double Vx;
double Vy;
double Vz;
double Rvir;
double Mvir;
double sigV;
// LC TODO we also want fmhires and gas/stellar props, or maybe just
// output a list of IDs and extract the props later
/* feel free to add whatever halo property you fancy... */
/* ...but for the time being we are only concerned with position and radius */
}HALO;
// Globals
HALOptr halo;
long nhalos_unc;
double Xhalo, Yhalo, Zhalo, BoxSize;
void read_halos (char *halofile);