-
Notifications
You must be signed in to change notification settings - Fork 28
/
SIDM.h
53 lines (48 loc) · 1.55 KB
/
SIDM.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
class SIDMSmoothParams : public SmoothParams
{
protected:
double a, H; // Cosmological parameters
double dTime;
double dDelta;
double dSIDMSigma;
double dSIDMVariable;
double iSIDMSelect;
virtual void fcnSmooth(GravityParticle *p, int nSmooth, pqSmoothNode *nList);
virtual int isSmoothActive(GravityParticle *p);
virtual void initTreeParticle(GravityParticle *p);
virtual void postTreeParticle(GravityParticle *p) {}
virtual void initSmoothParticle(GravityParticle *p);
virtual void initSmoothCache(GravityParticle *p);
virtual void combSmoothCache(GravityParticle *p1,ExternalSmoothParticle *p2);
public:
SIDMSmoothParams() {} //empty constructor
SIDMSmoothParams(int _iType, int am, CSM csm, double _dTime, double _dSIDMSigma, double _dSIDMVariable, int _iSIDMSelect, double _dDelta) {
iType = _iType;
activeRung = am;
dTime = _dTime;
dDelta = _dDelta;
dSIDMSigma= _dSIDMSigma;
dSIDMVariable= _dSIDMVariable;
iSIDMSelect= _iSIDMSelect;
if(csm->bComove) {
H = csmTime2Hub(csm,dTime);
a = csmTime2Exp(csm,dTime);
}
else {
H = 0.0;
a = 1.0;
}
}
PUPable_decl(SIDMSmoothParams);
SIDMSmoothParams(CkMigrateMessage *m) : SmoothParams(m) {}
virtual void pup(PUP::er &p) {
SmoothParams::pup(p);//Call base class
p|dTime;
p|dDelta;
p|dSIDMSigma;
p|dSIDMVariable;
p|iSIDMSelect;
p|a;
p|H;
}
};