CosmoGRaPH v0.0
particles_data.h
1 #ifndef COSMO_PARTICLES_DATA
2 #define COSMO_PARTICLES_DATA
3 
4 namespace cosmo
5 {
6 
13 template<typename RT>
14 struct Particle {
15  RT X[3]; // particle position
16  RT U[3]; // Particle velocity (covariant / lowered)
17  RT M; // Particle Mass
18 };
19 
27 template<typename RT>
29  // 4 standard "registers" for each particle
30  Particle<RT> p_p;
31  Particle<RT> p_a;
32  Particle<RT> p_c;
33  Particle<RT> p_f;
34 };
35 
36 typedef std::vector<ParticleRegister<real_t>> particle_vec;
37 
47 template<typename RT>
49  // metric components
50  RT rootdetg; // rooted metric determinant
51  RT alpha; // lapse
52  RT beta[3]; // shift
53  RT dalpha[3]; // derivative of lapse
54  RT dbeta[3][3]; // derivative of shift
55  RT gi[6]; // inverse spatial metric
56  RT dgi[3][6]; // Inverse metric derivative
57 };
58 
59 }
60 
61 #endif
Data structure containing 4 needed RK4 registers.
Definition: particles_data.h:28
Definition: bardeen.cc:5
Data structure for storing metric quantities ("primitives") at an arbitrary point.
Definition: particles_data.h:48
Data structure for particles.
Definition: particles_data.h:14