CosmoGRaPH v0.0
dust.h
1 #ifndef COSMO_DUST
2 #define COSMO_DUST
3 
4 #include "../../cosmo_types.h"
5 #include "../bssn/bssn.h"
6 
7 
8 namespace cosmo
9 {
10 
11 typedef struct {
12 
13  // conformal field values (D = tilde(D) from notes)
14  // or D = sqrt(gamma) D From Rezzolla
15  real_t D, S1, S2, S3;
16 
17  // Derived stuff
18  real_t W;
19  real_t v1, v2, v3; // contravariant velocities
20 
21 } DustData;
22 
23 
28 class Dust
29 {
30 
31 public:
32  register_t D;
33  register_t S1;
34  register_t S2;
35  register_t S3;
36 
37  arr_t aDv1, aDv2, aDv3;
38 
39  arr_t aS1v1, aS1v2, aS1v3;
40  arr_t aS2v1, aS2v2, aS2v3;
41  arr_t aS3v1, aS3v2, aS3v3;
42 
43  arr_t S1src, S2src, S3src;
44 
45  arr_t detg, g11, g12, g13, g22, g23, g33;
46  arr_t W;
47 
48  Dust();
49  ~Dust();
50 
51  void setDt(real_t dt);
52 
53  void stepInit(BSSN *bssn);
54  void K1Finalize();
55  void K2Finalize();
56  void K3Finalize();
57  void K4Finalize();
58  void populateDerivedFields(BSSN *bssn);
59  void RKEvolve(BSSN *bssn);
60 
61  real_t dt_D(idx_t i, idx_t j, idx_t k);
62  real_t dt_S1(idx_t i, idx_t j, idx_t k);
63  real_t dt_S2(idx_t i, idx_t j, idx_t k);
64  real_t dt_S3(idx_t i, idx_t j, idx_t k);
65 
66  DustData getDustData(BSSNData *bd);
67 
68  void addBSSNSrc(BSSN *bssn);
69 };
70 
71 } // namespace cosmo
72 
73 #endif
void K1Finalize()
Call RK4Register::K1Finalize for fields.
Definition: dust.cc:77
Definition: dust.h:11
Definition: bardeen.cc:5
BSSN Class: evolves BSSN metric fields, computes derived quantities.
Definition: bssn.h:24
Dust()
Constructor: initialize fields needed for dust evolution, set timestep according to global dt...
Definition: dust.cc:15
Structure containing BSSN metric variables and various derived quantities, such as derivatives of BSS...
Definition: bssn_data.h:18
Class implementing functionality for a dust fluid that relies on a BSSN instance. ...
Definition: dust.h:28
void stepInit(BSSN *bssn)
Call RK4Register::stepInit for fields.
Definition: dust.cc:65