-
Notifications
You must be signed in to change notification settings - Fork 1
/
kd.h
97 lines (76 loc) · 1.31 KB
/
kd.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef KD_HINCLUDED
#define KD_HINCLUDED
#include <stdio.h>
#define DARK 1
#define GAS 2
#define STAR 4
#define SOFT_UNI 1
#define SOFT_PLUM 2
#define SOFT_SPLINE 3
typedef struct Particle {
int iOrder;
int iMark;
float fMass;
float fSoft;
float r[3];
double a[3];
double dPot;
} PARTICLE;
typedef struct kdContext {
int nParticles;
int nGas;
int nDark;
int nStar;
int bGas;
int bDark;
int bStar;
int nActive;
int nMark;
float fTime;
double G;
float fPeriod[3];
float fCenter[3];
int iChkptInterval;
char *pszChkptName;
int iSoftType;
int bPeriodic;
int iBlockSize;
int uSecond;
int uMicro;
PARTICLE *p;
} * KD;
struct chkptHeader {
int nParticles;
int nGas;
int nDark;
int nStar;
int bGas;
int bDark;
int bStar;
int nActive;
int nMark;
double G;
float fPeriod[3];
float fCenter[3];
int iSoftType;
int bPeriodic;
int iBlockSize;
int uSecond;
int uMicro;
int lBlock;
int kBlock;
};
void kdTime(KD,int *,int *);
int kdInit(KD *,double,float *,float *,int,char *);
int kdReadTipsy(KD,FILE *,int,int,int,int);
void kdSetSoft(KD,float);
void kdInMark(KD,char *);
void kdMarkOrder(KD);
void kdOrder(KD);
void kdGravSimple(KD,int,int);
void kdGrav(KD,int,int,int,int);
void kdRestart(KD,int);
void kdOutAccel(KD,char *);
void kdOutPot(KD,char *);
void kdFinish(KD);
#endif