21 using namespace Jetscape;
24 TEST(CausalLiquifierTest, TEST_COORDINATES){
52 TEST(CausalLiquifierTest, TEST_CAUSALITY){
59 for(
int scale = 1.0; scale < 5.0; scale++ ){
60 double r_out = r_bound * scale;
68 std::array<Jetscape::real, 4> jmu = {0.0,0.0,0.0,0.0};
69 std::array<Jetscape::real, 4> droplet_xmu = {0.0, 0.0, 0.0, 0.0};
70 std::array<Jetscape::real, 4> droplet_pmu = {1.0, 1.0, 0.0, 0.0};
71 Droplet drop_i(droplet_xmu, droplet_pmu);
84 TEST(CausalLiquifierTest, TEST_CONSERVATION){
91 for(
double t=0.3;
t < 3.0;
t+=dt){
92 double integrated_value = 0.0;
93 for(
double r = 0.5*dr;
r<1.5*
t;
r+=dr){
104 TEST(CausalLiquifierTest, TEST_GRID_CARTESIAN_CONSERVATION){
106 double ll[3] = {0.05,0.1,0.3};
108 for(
int i=0;
i<0;
i++){
116 double dV = dx*dx*
dz;
125 for(
double t=0.5;
t < 3.0;
t+=dt){
126 double integrated_value = 0.0;
127 for(
int ix=0; ix<n_cells; ix++ ){
128 double x = ( ix - 0.5*
double(n_cells) )*dx;
129 for(
int iy=0; iy<n_cells; iy++ ){
130 double y = ( iy - 0.5*
double(n_cells) )*dy;
131 for(
int iz=0; iz<n_cells; iz++ ){
132 double z = ( iz - 0.5*
double(n_cells) )*dz;
134 double r = sqrt(x*x+y*y+z*z);
152 TEST(CausalLiquifierTest, TEST_GRID_TAU_ETA_CONSERVATION){
155 std::array<Jetscape::real, 4> x_in = {1.0, 0.0, 0.0, 1.0};
156 std::array<Jetscape::real, 4> p_in = {1.0, 1.0, 1.0, 1.0};
166 int n_eta = 5.0/deta;
178 for(
double t=0.2;
t < 4.0;
t+=dt){
179 double integrated_value = 0.0;
180 double tau_delay =
t;
183 std::array<Jetscape::real, 4> total_pmu = {0.0, 0.0, 0.0, 0.0};
184 std::array<Jetscape::real, 4> x_hydro = {0.0, 0.0, 0.0, 0.0};
185 x_hydro[0] = x_in[0]+tau_delay;
186 double dvolume = x_hydro[0]*dx*dy*deta;
188 for(
int ix=0; ix<n_xy; ix++ ){
189 x_hydro[1] = ( ix - 0.5*
double(n_xy) )*dx;
190 for(
int iy=0; iy<n_xy; iy++ ){
191 x_hydro[2] = ( iy - 0.5*
double(n_xy) )*dy;
192 for(
int ieta=0; ieta<
n_eta; ieta++ ){
193 x_hydro[3] = ( ieta - 0.5*
double(n_eta) )*deta;
196 std::array<Jetscape::real, 4> jmu = {0.0, 0.0, 0.0, 0.0};
198 lqf.
smearing_kernel(x_hydro[0],x_hydro[1],x_hydro[2],x_hydro[3],a_drop, jmu);
200 total_pmu[0] += dtau*(jmu[0]*cosh(x_hydro[3]) + jmu[3]*sinh(x_hydro[3]))*dvolume;
201 total_pmu[1] += dtau*jmu[1]*dvolume;
202 total_pmu[2] += dtau*jmu[2]*dvolume;
203 total_pmu[3] += dtau*(jmu[0]*sinh(x_hydro[3]) + jmu[3]*cosh(x_hydro[3]))*dvolume;
206 integrated_value += dtau*jmu[1]*dvolume;