22 #include "../../utils/RK4Register.h" 23 #include "../../utils/Array.h" 24 #include "../../utils/Timer.h" 25 #include "../../cosmo_types.h" 26 #include "../bssn/bssn.h" 27 #include "../../utils/TriCubicInterpolator.h" 28 #include "../Lambda/lambda.h" 61 bool follow_null_geodesics;
63 real_t ray_bundle_epsilon, det_g_obs;
68 enum carrierCountScheme { per_dx = 0, per_ds = 1};
69 carrierCountScheme carrier_count_scheme;
71 enum depositScheme { CIC = 0, PCS = 1, CINT = 2 };
72 depositScheme deposit;
74 idx_t carriers_per_dx,
81 void setDt(real_t dt);
86 real_t
_S1IDXtoX0(idx_t s1) {
return (real_t)s1*lx/ns1; }
87 real_t _S2IDXtoY0(idx_t s2) {
return (real_t)s2*ly/ns2; }
88 real_t _S3IDXtoZ0(idx_t s3) {
return (real_t)s3*lz/
ns3; }
89 real_t
_S1IDXtoX0(real_t s1) {
return (real_t)s1*lx/(real_t)ns1; }
90 real_t _S2IDXtoY0(real_t s2) {
return (real_t)s2*ly/(real_t)ns2; }
91 real_t _S3IDXtoZ0(real_t s3) {
return (real_t)s3*lz/(real_t)ns3; }
93 void _MassDeposit(real_t weight, real_t x_idx, real_t y_idx, real_t z_idx,
96 void _CICDeposit(real_t weight, real_t x_idx, real_t y_idx, real_t z_idx,
99 void _PCSDeposit(real_t weight, real_t x_idx, real_t y_idx, real_t z_idx,
102 void _CINTDeposit(real_t weight, real_t x_idx, real_t y_idx, real_t z_idx,
105 void _deconvolve(
arr_t &field);
136 idx_t s3_idx, real_t X0_lower, real_t X0_upper);
140 void rescaleFieldPerturbations(
arr_t & field, real_t multiplier);
141 void rescaleVelocityPerturbations(
arr_t & ux,
arr_t & uy,
arr_t & uz, real_t multiplier);
142 void rescalePositionPerturbations(
arr_t & dx,
arr_t & dy,
arr_t & dz, real_t multiplier);
143 void rescaleAllFieldPerturbations(
BSSN *bssn, real_t multiplier);
145 void RKStep(
BSSN *bssn);
154 arr_t d1alpha_a, d2alpha_a, d3alpha_a;
156 arr_t d1gammai11_a, d1gammai22_a, d1gammai33_a,
157 d1gammai12_a, d1gammai13_a, d1gammai23_a;
159 arr_t d2gammai11_a, d2gammai22_a, d2gammai33_a,
160 d2gammai12_a, d2gammai13_a, d2gammai23_a;
162 arr_t d3gammai11_a, d3gammai22_a, d3gammai33_a,
163 d3gammai12_a, d3gammai13_a, d3gammai23_a;
165 arr_t d1beta1_a, d1beta2_a, d1beta3_a;
166 arr_t d2beta1_a, d2beta2_a, d2beta3_a;
167 arr_t d3beta1_a, d3beta2_a, d3beta3_a;
169 std::vector<real_t> getgammaiIJ(idx_t s1, idx_t s2, idx_t s3,
BSSN *bssnSim);
170 std::vector<real_t> getgammaIJ(idx_t s1, idx_t s2, idx_t s3,
BSSN *bssnSim);
175 real_t dot_cov_spatial_vectors(real_t * v1, real_t * v2, std::vector<real_t> gammaiIJ);
176 real_t mag_cov_spatial_vector(real_t * v1, std::vector<real_t> gammaiIJ);
177 real_t dot_cont_spatial_vectors(real_t * v1, real_t * v2, std::vector<real_t> gammaIJ);
178 real_t mag_cont_spatial_vector(real_t * v1, std::vector<real_t> gammaIJ);
179 real_t dot_4_vectors_vvg(real_t v1[4], real_t v2[4], real_t g[4][4]);
180 real_t dot_4_vectors_vv(real_t v1[4], real_t v2[4]);
184 #endif // include guard real_t _getXRangeInSVoxel(register_t &DX, idx_t s1_idx, idx_t s2_idx, idx_t s3_idx, real_t X0_lower, real_t X0_upper)
Definition: sheets.cc:291
void _setMetricPotentials()
real_t lz
Metric grid physical dimensions.
Definition: sheets.h:53
void addBSSNSource(BSSN *bssn, real_t tot_mass)
Definition: sheets.cc:323
void _pushSheetMassToRho(idx_t s1, idx_t s2, idx_t s3)
real_t dz
Metric grid physical spacing.
Definition: sheets.h:54
void _PCSDeposit(real_t weight, real_t x_idx, real_t y_idx, real_t z_idx, arr_t &rho)
Piecewise cubic spline deposition.
Definition: sheets.cc:159
void _CINTDeposit(real_t weight, real_t x_idx, real_t y_idx, real_t z_idx, arr_t &rho)
Deposition based on cubic interoplation (CINT)
Definition: sheets.cc:257
BSSN Class: evolves BSSN metric fields, computes derived quantities.
Definition: bssn.h:24
std::vector< real_t > getRayDataAtS(idx_t s, BSSN *bssnSim, Lambda *lambda)
Function to get metric/data for a particular particle; Currently only ok for zero shift (maybe ok in ...
Definition: sheets.cc:1074
real_t _S1IDXtoX0(idx_t s1)
Definition: sheets.h:86
idx_t ns3
Phase-space sheet resolution.
Definition: sheets.h:52
register_t vz
Phase-space velocity fields.
Definition: sheets.h:57
register_t Dz
Metric-space displacements.
Definition: sheets.h:56
arr_t tmp
Array for misc. tmp storage (such as deconvolving)
Definition: sheets.h:59