changa  3.5
 All Classes Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
SIDM.h
1 
3 {
4  protected:
5  double a, H; // Cosmological parameters
6  double dTime;
7  double dDelta;
8  double dSIDMSigma;
9  double dSIDMVariable;
10  double iSIDMSelect;
11  virtual void fcnSmooth(GravityParticle *p, int nSmooth, pqSmoothNode *nList);
12  virtual int isSmoothActive(GravityParticle *p);
13  virtual void initTreeParticle(GravityParticle *p);
14  virtual void postTreeParticle(GravityParticle *p) {}
15  virtual void initSmoothParticle(GravityParticle *p);
16  virtual void initSmoothCache(GravityParticle *p);
18 
19  public:
20  SIDMSmoothParams() {} //empty constructor
21  SIDMSmoothParams(int _iType, int am, CSM csm, double _dTime, double _dSIDMSigma, double _dSIDMVariable, int _iSIDMSelect, double _dDelta) {
22  iType = _iType;
23  activeRung = am;
24  dTime = _dTime;
25  dDelta = _dDelta;
26  dSIDMSigma= _dSIDMSigma;
27  dSIDMVariable= _dSIDMVariable;
28  iSIDMSelect= _iSIDMSelect;
29 
30  if(csm->bComove) {
31  H = csmTime2Hub(csm,dTime);
32  a = csmTime2Exp(csm,dTime);
33  }
34  else {
35  H = 0.0;
36  a = 1.0;
37  }
38 
39  }
40  PUPable_decl(SIDMSmoothParams);
41  SIDMSmoothParams(CkMigrateMessage *m) : SmoothParams(m) {}
42  virtual void pup(PUP::er &p) {
43  SmoothParams::pup(p);//Call base class
44  p|dTime;
45  p|dDelta;
46  p|dSIDMSigma;
47  p|dSIDMVariable;
48  p|iSIDMSelect;
49  p|a;
50  p|H;
51  }
52  };
53 
Class for cross processor data needed for smooth operations.
Definition: GravityParticle.h:568
virtual void initSmoothParticle(GravityParticle *p)
initialize particles to be smoothed
Definition: SIDM.cpp:33
virtual int isSmoothActive(GravityParticle *p)
Particle is doing a neighbor search.
Definition: SIDM.cpp:28
virtual void initTreeParticle(GravityParticle *p)
initialize particles in tree but not smoothed
Definition: SIDM.cpp:36
virtual void postTreeParticle(GravityParticle *p)
calculation on all tree particles after all walks are done
Definition: SIDM.h:14
virtual void initSmoothCache(GravityParticle *p)
initialize particles as they come into the cache
Definition: SIDM.cpp:39
Cosmological parameters.
Definition: cosmo.h:10
int iType
Particle type to smooth over; "TreeActive".
Definition: smoothparams.h:11
Object for priority queue entry.
Definition: smooth.h:12
virtual void pup(PUP::er &p)
required method for remote entry call.
Definition: smoothparams.h:45
virtual void fcnSmooth(GravityParticle *p, int nSmooth, pqSmoothNode *nList)
Function to apply to smooth particle and neighbors.
Definition: SIDM.cpp:49
A base class from which parameters for all smooth operations can be derived.
Definition: smoothparams.h:8
virtual void pup(PUP::er &p)
required method for remote entry call.
Definition: SIDM.h:42
virtual void combSmoothCache(GravityParticle *p1, ExternalSmoothParticle *p2)
combine cache copy with home particle
Definition: SIDM.cpp:43
int activeRung
Currently active rung.
Definition: smoothparams.h:12
Fundamental type for a particle.
Definition: GravityParticle.h:316
Definition: SIDM.h:2