forked from N-BodyShop/gasoline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrotbar.h
59 lines (55 loc) · 1.69 KB
/
rotbar.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
#ifndef ROTBAR_HINCLUDED
#define ROTBAR_HINCLUDED
#ifndef LOG_HINCLUDED
#include "log.h"
#endif
#include "fdl.h"
#include "param.h"
typedef struct rotbarContext {
double bratio;
double cratio;
double amplitude; /* dAmp times dAmpFac (gets passed to pkdRotatingBar() */
double dAmplitude; /* relative amplitude */
double Fcorot;
int soft;
double dPos[3];
double dVel[3];
double dAcc[3];
double dTorque[3];
double (*getMass)(struct rotbarContext *, double);
double (*getPot)(struct rotbarContext *, double);
double dMass; /* parameters for rotating bar */
double dLength;
double dCorotFac;
double dTurnOff;
double dTurnOn;
double dAmpFac;
double dDuration; /* time scale for Turn Off/On */
double dPosAng; /* current angle */
double dTime0; /* time at beginning of big timestep */
double dOmega;
double dB5;
double dIz;
double dLz;
double dLz0; /* Initial Angular moment of bar */
double dLzPart; /* Angular momentum of particles */
double *pdMmono;
double *pdRmono;
double *pdPmono;
int nBinMono;
double A;
double B;
double C;
int bFixedBar;
int bMonopole; /* include monopole force of bar */
double dMonopoleFac; /* scale monopole force by this amount */
} *ROTBAR;
void rotbarAddParams(ROTBAR rotbar, PRM prm);
void rotbarLogParams(ROTBAR rotbar, LOGGER *lgr);
void rotbarCheckWrite(ROTBAR rotbar, FDL_CTX *fdl);
void rotbarCheckRead(ROTBAR rotbar, FDL_CTX *fdl);
void rotbarInitialize(ROTBAR *protbar);
void rotbarInitValues(ROTBAR rotbar);
void rotbarDrift(ROTBAR rotbar, double dTime, double dDelta);
void rotbarKick(ROTBAR rotbar, double dvFacOne, double dvFacTwo);
#endif