25 boost_invariant =
false;
33 if (boost_invariant) {
37 lattice_3D_ideal.clear();
42 string input_filename_in,
43 string hydro_ideal_filename_in,
44 string hydro_shear_filename_in,
45 string hydro_bulk_filename_in) {
50 lattice_3D_ideal.clear();
52 input_filename = input_filename_in;
53 hydro_ideal_filename = hydro_ideal_filename_in;
54 hydro_shear_filename = hydro_shear_filename_in;
55 hydro_bulk_filename = hydro_bulk_filename_in;
58 hydroWhichHydro = whichHydro;
59 if (hydroWhichHydro < 10) {
61 config_file << input_filename;
63 configuration.open(config_file.str().c_str(),
ios::in);
65 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
66 <<
"Unable to open file: " << config_file.str() << endl;
71 while (!configuration.eof()) {
72 getline(configuration, temp1);
73 stringstream ss(temp1);
77 if (temp_name ==
"Initial_time_tau_0") {
79 }
else if (temp_name ==
"Delta_Tau") {
81 }
else if (temp_name ==
"X_grid_size_in_fm") {
85 }
else if (temp_name ==
"Grid_size_in_x") {
87 }
else if (temp_name ==
"Eta_grid_size") {
90 hydro_eta_max = temp/2.;
91 }
else if (temp_name ==
"Grid_size_in_eta") {
93 }
else if (temp_name ==
"output_evolution_every_N_timesteps") {
95 }
else if (temp_name ==
"output_evolution_every_N_x") {
97 }
else if (temp_name ==
"output_evolution_every_N_eta") {
101 if (temp_name ==
"Include_Rhob_Yes_1_No_0") {
103 }
else if (temp_name ==
"Include_Shear_Visc_Yes_1_No_0") {
105 }
else if (temp_name ==
"Include_Bulk_Visc_Yes_1_No_0") {
107 }
else if (temp_name ==
"turn_on_baryon_diffusion") {
111 configuration.close();
112 hydroDx = 2.*hydroXmax/(ixmax - 1.);
113 hydroDeta = 2.*hydro_eta_max/(
static_cast<double>(ietamax));
116 use_tau_eta_coordinate = 1;
117 if (use_tau_eta_coordinate == 0) {
118 cout <<
"Hydroinfo_MUSIC:: Warning hydro grid is set to "
119 <<
"cartesian coordinates, please make sure this is correct!"
123 if (whichHydro == 6) {
125 cout <<
"Using 3+1D Jeon Schenke hydro reading data ..." << endl;
126 boost_invariant =
false;
128 ixmax =
static_cast<int>(2.*hydroXmax/hydroDx + 0.001);
129 ietamax =
static_cast<int>(2.*hydro_eta_max/hydroDeta + 0.001);
133 string evolution_name = hydro_ideal_filename;
134 cout <<
"Evolution file name = " << evolution_name << endl;
136 fin.open(evolution_name.c_str(),
ios::in);
138 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
139 <<
"Unable to open file: " << evolution_name << endl;
158 lattice_3D.push_back(newCell);
160 cout <<
"o" <<
flush;
164 }
else if (whichHydro == 8) {
169 boost_invariant =
true;
170 cout <<
"Reading event-by-event hydro evolution data "
171 <<
"from standard MUSIC ..." << endl;
173 ixmax =
static_cast<int>(2.*hydroXmax/hydroDx + 0.001);
175 nskip_tau = nskip_tau_in;
178 hydroDtau *= nskip_tau;
179 hydroDeta *= nskip_eta;
183 int num_fluid_cell_trans = ixmax*ixmax;
186 string evolution_name = hydro_ideal_filename;
187 string evolution_name_Wmunu = hydro_shear_filename;
188 string evolution_name_Pi = hydro_bulk_filename;
191 string evolution_file_name = evolution_name;
192 cout <<
"Evolution file name = " << evolution_file_name << endl;
193 fin = std::fopen(evolution_file_name.c_str(),
"rb");
196 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
197 <<
"Unable to open file: " << evolution_file_name << endl;
201 std::FILE *fin1 = NULL;
202 if (turn_on_shear == 1) {
203 fin1 = std::fopen(evolution_name_Wmunu.c_str(),
"rb");
205 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
206 <<
"Unable to open file: " << evolution_name_Wmunu << endl;
211 std::FILE *fin2 = NULL;
212 if (turn_on_bulk == 1) {
213 fin2 = std::fopen(evolution_name_Pi.c_str(),
"rb");
215 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
216 <<
"Unable to open file: " << evolution_name_Pi << endl;
236 float e_plus_P = 1
e-15;
238 int size =
sizeof(float);
241 status = std::fread(&T, size, 1, fin);
242 status += std::fread(&QGPfrac, size, 1, fin);
243 status += std::fread(&vx, size, 1, fin);
244 status += std::fread(&vy, size, 1, fin);
245 status += std::fread(&vz, size, 1, fin);
252 if (turn_on_shear == 1) {
253 status_pi = std::fread(&pi00, size, 1, fin1);
254 status_pi += std::fread(&pi01, size, 1, fin1);
255 status_pi += std::fread(&pi02, size, 1, fin1);
256 status_pi += std::fread(&pi03, size, 1, fin1);
257 status_pi += std::fread(&pi11, size, 1, fin1);
258 status_pi += std::fread(&pi12, size, 1, fin1);
259 status_pi += std::fread(&pi13, size, 1, fin1);
260 status_pi += std::fread(&pi22, size, 1, fin1);
261 status_pi += std::fread(&pi23, size, 1, fin1);
262 status_pi += std::fread(&pi33, size, 1, fin1);
264 if (status_pi != 10) {
265 cout <<
"Error:Hydroinfo_MUSIC::readHydroData: "
266 <<
"Wmunu file does not have the same number of "
267 <<
"fluid cells as the ideal file!" << endl;
272 int status_bulkPi = 0;
273 if (turn_on_bulk == 1) {
274 status_bulkPi = std::fread(&bulkPi, size, 1, fin2);
275 status_bulkPi += std::fread(&e_plus_P, size, 1, fin2);
276 status_bulkPi += std::fread(&cs2, size, 1, fin2);
278 if (status_bulkPi != 3) {
279 cout <<
"Error:Hydroinfo_MUSIC::readHydroData: "
280 <<
"bulkPi file does not have the same number of "
281 <<
"fluid cells as the ideal file!" << endl;
286 int ieta_idx =
static_cast<int>(ik/num_fluid_cell_trans) % n_eta;
287 int itau_idx =
static_cast<int>(ik/(num_fluid_cell_trans*
n_eta));
289 if (itau_idx%nskip_tau != 0)
293 double tau_local = hydroTau0 + itau_idx*hydroDtau/nskip_tau;
294 if ((ik-1)%(num_fluid_cell_trans*
n_eta) == 0) {
295 cout <<
"read in tau frame: " << itau_idx
296 <<
" tau_local = " << setprecision(3) << tau_local
300 if (ieta_idx == (n_eta-1)) {
302 double v2 = vx*vx + vy*vy + vz*
vz;
304 cerr <<
"[Hydroinfo_MUSIC::readHydroData:] Error: "
305 <<
"v > 1! vx = " << vx <<
", vy = " << vy
306 <<
", vz = " << vz <<
", T = " << T << endl;
313 double gamma = 1./sqrt(1. - v2);
336 newCell.
bulkPi = bulkPi/(15.*(1./3. - cs2)*e_plus_P);
340 lattice_2D.push_back(newCell);
344 if (turn_on_shear == 1) {
347 if (turn_on_bulk == 1) {
351 cout <<
"number of fluid cells: " << lattice_2D.size() << endl;
352 }
else if (whichHydro == 9) {
355 boost_invariant =
true;
356 cout <<
"Reading event-by-event hydro evolution data "
357 <<
"from (2+1)D MUSIC ..." << endl;
362 hydroDtau *= nskip_tau;
363 hydroDeta *= nskip_eta;
365 nskip_tau = nskip_tau_in;
366 ixmax =
static_cast<int>(2.*hydroXmax/hydroDx + 0.001);
370 int num_fluid_cell_trans = ixmax*ixmax;
373 string evolution_name = hydro_ideal_filename;
374 string evolution_name_Wmunu = hydro_shear_filename;
375 string evolution_name_Pi = hydro_bulk_filename;
378 string evolution_file_name = evolution_name;
379 cout <<
"Evolution file name = " << evolution_file_name << endl;
380 fin = std::fopen(evolution_file_name.c_str(),
"rb");
383 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
384 <<
"Unable to open file: " << evolution_file_name << endl;
388 std::FILE *fin1 = NULL;
389 if (turn_on_shear == 1) {
390 fin1 = std::fopen(evolution_name_Wmunu.c_str(),
"rb");
392 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
393 <<
"Unable to open file: " << evolution_name_Wmunu << endl;
398 std::FILE *fin2 = NULL;
399 if (turn_on_bulk == 1) {
400 fin2 = std::fopen(evolution_name_Pi.c_str(),
"rb");
402 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
403 <<
"Unable to open file: " << evolution_name_Pi << endl;
410 double T, QGPfrac, ux, uy, ueta;
423 float e_plus_P = 1
e-15;
428 status = std::fread(&T, size, 1, fin);
429 status += std::fread(&QGPfrac, size, 1, fin);
430 status += std::fread(&vx, size, 1, fin);
431 status += std::fread(&vy, size, 1, fin);
432 status += std::fread(&vz, size, 1, fin);
437 double v2 = vx*vx + vy*vy + vz*
vz;
439 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
440 <<
"v > 1! vx = " << vx <<
", vy = " << vy
441 <<
", vz = " << vz << endl;
444 double gamma = 1./sqrt(1. - v2);
450 if (turn_on_shear == 1) {
451 status_pi = std::fread(&pi00, size, 1, fin1);
452 status_pi += std::fread(&pi01, size, 1, fin1);
453 status_pi += std::fread(&pi02, size, 1, fin1);
454 status_pi += std::fread(&pi03, size, 1, fin1);
455 status_pi += std::fread(&pi11, size, 1, fin1);
456 status_pi += std::fread(&pi12, size, 1, fin1);
457 status_pi += std::fread(&pi13, size, 1, fin1);
458 status_pi += std::fread(&pi22, size, 1, fin1);
459 status_pi += std::fread(&pi23, size, 1, fin1);
460 status_pi += std::fread(&pi33, size, 1, fin1);
462 if (status_pi != 10) {
463 cout <<
"Error:Hydroinfo_MUSIC::readHydroData: "
464 <<
"Wmunu file does not have the same number of "
465 <<
"fluid cells as the ideal file!" << endl;
470 int status_bulkPi = 0;
471 if (turn_on_bulk == 1) {
472 status_bulkPi = std::fread(&bulkPi, size, 1, fin2);
473 status_bulkPi += std::fread(&e_plus_P, size, 1, fin2);
474 status_bulkPi += std::fread(&cs2, size, 1, fin2);
476 if (status_bulkPi != 3) {
477 cout <<
"Error:Hydroinfo_MUSIC::readHydroData: "
478 <<
"bulkPi file does not have the same number of "
479 <<
"fluid cells as the ideal file!" << endl;
484 int ieta_idx =
static_cast<int>(ik/num_fluid_cell_trans) % n_eta;
485 int itau_idx =
static_cast<int>(ik/(num_fluid_cell_trans*
n_eta));
487 if (itau_idx%nskip_tau != 0)
491 double tau_local = hydroTau0 + itau_idx*hydroDtau/nskip_tau;
492 if ((ik-1)%(num_fluid_cell_trans*
n_eta) == 0) {
493 cout <<
"read in tau frame: " << itau_idx
494 <<
" tau_local = " << setprecision(3) << tau_local
498 if (ieta_idx == (n_eta-1)) {
516 newCell.
bulkPi = bulkPi/(15.*(1./3. - cs2)*e_plus_P);
520 lattice_2D.push_back(newCell);
524 if (turn_on_shear == 1) {
527 if (turn_on_bulk == 1) {
531 cout <<
"number of fluid cells: " << lattice_2D.size() << endl;
532 }
else if (whichHydro == 10 || whichHydro == 11) {
534 cout <<
"Using 3+1D new MUSIC hydro reading data ..." << endl;
535 if (whichHydro == 10) {
536 boost_invariant =
false;
538 boost_invariant =
true;
543 string evolution_name = hydro_ideal_filename;
544 cout <<
"Evolution file name = " << evolution_name << endl;
546 fin = std::fopen(evolution_name.c_str(),
"rb");
548 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
549 <<
"Unable to open file: " << evolution_name << endl;
554 int status = std::fread(&header,
sizeof(
float), 16, fin);
556 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
557 <<
"Can not read the evolution file header" << endl;
561 hydroTau0 = header[0];
562 hydroDtau = header[1];
563 ixmax =
static_cast<int>(header[2]);
565 hydroXmax = std::abs(header[4]);
566 ietamax =
static_cast<int>(header[8]);
567 hydroDeta = header[9];
568 hydro_eta_max = std::abs(header[10]);
569 turn_on_rhob =
static_cast<int>(header[11]);
570 turn_on_shear =
static_cast<int>(header[12]);
571 turn_on_bulk =
static_cast<int>(header[13]);
572 turn_on_diff =
static_cast<int>(header[14]);
573 const int nVar_per_cell =
static_cast<int>(header[15]);
575 float cell_info[nVar_per_cell];
589 lattice_3D_ideal.push_back(zeroCell);
593 status = std::fread(&cell_info,
sizeof(
float), nVar_per_cell, fin);
594 if (status == 0)
break;
595 if (status != nVar_per_cell) {
596 cerr <<
"[Hydroinfo_MUSIC::readHydroData]: ERROR: "
597 <<
"the evolution file format is not correct" << endl;
601 if (itau_max < static_cast<int>(cell_info[0]))
602 itau_max =
static_cast<int>(cell_info[0]);
604 newCell.
itau =
static_cast<int>(cell_info[0]);
605 newCell.
ix =
static_cast<int>(cell_info[1]);
606 newCell.
iy =
static_cast<int>(cell_info[2]);
607 newCell.
ieta =
static_cast<int>(cell_info[3]);
609 newCell.
ed = cell_info[4];
611 newCell.
ux = cell_info[8];
612 newCell.
uy = cell_info[9];
613 newCell.
uz = cell_info[10];
614 lattice_3D_ideal.push_back(newCell);
618 cout <<
"o" <<
flush;
625 long long ncells = (itaumax + 1)*ixmax*ixmax*ietamax;
626 idx_map_.resize(ncells, 0);
627 for (
int i = 0;
i < lattice_3D_ideal.size();
i++) {
628 const auto cell_i = lattice_3D_ideal[
i];
629 long long cell_idx = (
630 ( (cell_i.itau*ietamax + cell_i.ieta)*ixmax
631 + cell_i.iy)*ixmax + cell_i.ix);
632 idx_map_[cell_idx] =
i;
634 hydroTauMax = hydroTau0 + hydroDtau*itaumax;
636 cout <<
"Hydroinfo_MUSIC:: This option is obsolete! whichHydro = "
637 << whichHydro << endl;
644 if (whichHydro == 6) {
646 hydroTau0 + hydroDtau*
static_cast<int>(
647 static_cast<double>(lattice_3D.size())
648 /((2.*hydroXmax/hydroDx+1.)*(2.*hydroXmax/hydroDx+1.)
649 *2.*(hydro_eta_max/hydroDeta))));
650 itaumax =
static_cast<int>((hydroTauMax-hydroTau0)/hydroDtau+0.001);
652 if (whichHydro == 8 || whichHydro == 9) {
654 hydroTau0 + hydroDtau*
static_cast<int>(
655 static_cast<double>(lattice_2D.size())
656 /((2.*hydroXmax/hydroDx)*(2.*hydroXmax/hydroDx)) - 1));
657 itaumax =
static_cast<int>((hydroTauMax - hydroTau0)/hydroDtau);
660 cout <<
"hydro_tau0 = " << hydroTau0 <<
" fm"<< endl;
661 cout <<
"hydro_tau_max = " << hydroTauMax <<
" fm" << endl;
662 cout <<
"hydry_dtau = " << hydroDtau <<
" fm" << endl;
663 cout <<
"hydro_Xmax = " << hydroXmax <<
" fm" << endl;
664 cout <<
"hydro_dx = " << hydroDx <<
" fm" << endl;
665 cout <<
"hydro_eta_max = " << hydro_eta_max << endl;
666 cout <<
"hydro_deta = " << hydroDeta << endl;
678 if (use_tau_eta_coordinate == 1) {
681 eta = 0.5*log((t+z)/(t-z));
693 int ieta = floor((hydro_eta_max+eta)/hydroDeta + 0.0001);
694 int itau = floor((tau-hydroTau0)/hydroDtau + 0.0001);
695 int ix = floor((hydroXmax+x)/hydroDx + 0.0001);
696 int iy = floor((hydroXmax+y)/hydroDx + 0.0001);
698 double xfrac = (x - (
static_cast<double>(ix)*hydroDx - hydroXmax))/hydroDx;
699 double yfrac = (y - (
static_cast<double>(iy)*hydroDx - hydroXmax))/hydroDx;
700 double etafrac = (eta/hydroDeta -
static_cast<double>(ieta)
701 + 0.5*static_cast<double>(ietamax));
702 double taufrac = (tau - hydroTau0)/hydroDtau - static_cast<double>(itau);
704 if (boost_invariant) {
709 if (ix < 0 || ix >= ixmax) {
711 cout <<
"[Hydroinfo_MUSIC::getHydroValues]: "
712 <<
"WARNING - x out of range x=" << x
713 <<
", ix=" << ix <<
", ixmax=" << ixmax << endl;
714 cout <<
"x=" << x <<
" y=" << y <<
" eta=" << eta
715 <<
" ix=" << ix <<
" iy=" << iy <<
" ieta=" << ieta << endl;
716 cout <<
"t=" << t <<
" tau=" << tau
717 <<
" itau=" << itau <<
" itaumax=" << itaumax << endl;
726 if (iy < 0 || iy >= ixmax) {
728 cout <<
"[Hydroinfo_MUSIC::getHydroValues]: "
729 <<
"WARNING - y out of range, y=" << y <<
", iy=" << iy
730 <<
", iymax=" << ixmax << endl;
731 cout <<
"x=" << x <<
" y=" << y <<
" eta=" << eta
732 <<
" ix=" << ix <<
" iy=" << iy <<
" ieta=" << ieta << endl;
733 cout <<
"t=" << t <<
" tau=" << tau
734 <<
" itau=" << itau <<
" itaumax=" << itaumax << endl;
743 if (itau < 0 || itau > itaumax) {
745 cout <<
"[Hydroinfo_MUSIC::getHydroValues]: WARNING - "
746 <<
"tau out of range, itau=" << itau
747 <<
", itaumax=" << itaumax << endl;
748 cout <<
"[MARTINI:Hydroinfo_MUSIC::getHydroValues]: tau= " << tau
749 <<
", hydroTauMax = " << hydroTauMax
750 <<
", hydroDtau = " << hydroDtau << endl;
759 if (ieta < 0 || ieta >= ietamax) {
761 cout <<
"[Hydroinfo_MUSIC::getHydroValues]: WARNING - "
762 <<
"eta out of range, ieta=" << ieta
763 <<
", ietamax=" << ietamax
775 for (
int ipx = 0; ipx < 2; ipx++) {
777 if (ipx == 0 || ix == ixmax-1) {
782 for (
int ipy = 0; ipy < 2; ipy++) {
784 if (ipy == 0 || iy == ixmax-1) {
789 for (
int ipeta = 0; ipeta < 2; ipeta++) {
791 if (ipeta == 0 || ieta == ietamax-1) {
796 for (
int iptau = 0; iptau < 2; iptau++) {
798 if (iptau == 0 || itau == itaumax) {
803 position[ipx][ipy][ipeta][iptau] = (
804 px + ixmax*(py + ixmax*(peta + ietamax*ptau)));
836 for (
int iptau = 0; iptau < 2; iptau++) {
839 taufactor = 1. - taufrac;
842 for (
int ipeta = 0; ipeta < 2; ipeta++) {
845 etafactor = 1. - etafrac;
848 for (
int ipy = 0; ipy < 2; ipy++) {
851 yfactor = 1. - yfrac;
855 double prefrac = yfactor*etafactor*taufactor;
857 if (hydroWhichHydro == 8 || hydroWhichHydro == 9) {
858 HydroCell_2D_ptr1 = (
859 &lattice_2D[position[0][ipy][ipeta][iptau]]);
860 HydroCell_2D_ptr2 = (
861 &lattice_2D[position[1][ipy][ipeta][iptau]]);
862 T += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
temperature
864 ux += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
ux
865 + xfrac*HydroCell_2D_ptr2->
ux);
866 uy += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
uy
867 + xfrac*HydroCell_2D_ptr2->
uy);
868 ueta += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
ueta
869 + xfrac*HydroCell_2D_ptr2->
ueta);
870 pi00 += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
pi00
871 + xfrac*HydroCell_2D_ptr2->
pi00);
872 pi01 += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
pi01
873 + xfrac*HydroCell_2D_ptr2->
pi01);
874 pi02 += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
pi02
875 + xfrac*HydroCell_2D_ptr2->
pi02);
876 pi11 += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
pi11
877 + xfrac*HydroCell_2D_ptr2->
pi11);
878 pi12 += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
pi12
879 + xfrac*HydroCell_2D_ptr2->
pi12);
880 pi22 += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
pi22
881 + xfrac*HydroCell_2D_ptr2->
pi22);
882 pi33 += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
pi33
883 + xfrac*HydroCell_2D_ptr2->
pi33);
884 bulkPi += prefrac*((1. - xfrac)*HydroCell_2D_ptr1->
bulkPi
885 + xfrac*HydroCell_2D_ptr2->
bulkPi);
886 }
else if (hydroWhichHydro == 6) {
887 HydroCell_3D_ptr1 = (
888 &lattice_3D[position[0][ipy][ipeta][iptau]]);
889 HydroCell_3D_ptr2 = (
890 &lattice_3D[position[1][ipy][ipeta][iptau]]);
891 T += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
temperature
893 vx += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
vx
894 + xfrac*HydroCell_3D_ptr2->
vx);
895 vy += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
vy
896 + xfrac*HydroCell_3D_ptr2->
vy);
897 vz += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
vz
898 + xfrac*HydroCell_3D_ptr2->
vz);
899 pi00 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi00
900 + xfrac*HydroCell_3D_ptr2->
pi00);
901 pi01 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi01
902 + xfrac*HydroCell_3D_ptr2->
pi01);
903 pi02 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi02
904 + xfrac*HydroCell_3D_ptr2->
pi02);
905 pi03 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi03
906 + xfrac*HydroCell_3D_ptr2->
pi03);
907 pi11 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi11
908 + xfrac*HydroCell_3D_ptr2->
pi11);
909 pi12 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi12
910 + xfrac*HydroCell_3D_ptr2->
pi12);
911 pi13 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi13
912 + xfrac*HydroCell_3D_ptr2->
pi13);
913 pi22 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi22
914 + xfrac*HydroCell_3D_ptr2->
pi22);
915 pi23 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi23
916 + xfrac*HydroCell_3D_ptr2->
pi23);
917 pi33 += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
pi33
918 + xfrac*HydroCell_3D_ptr2->
pi33);
919 bulkPi += prefrac*((1. - xfrac)*HydroCell_3D_ptr1->
bulkPi
920 + xfrac*HydroCell_3D_ptr2->
bulkPi);
921 }
else if (hydroWhichHydro == 10 || hydroWhichHydro == 11) {
922 HydroCell_3D_ideal_ptr1 = (
923 &lattice_3D_ideal[idx_map_[position[0][ipy][ipeta][iptau]]]);
924 HydroCell_3D_ideal_ptr2 = (
925 &lattice_3D_ideal[idx_map_[position[1][ipy][ipeta][iptau]]]);
926 T += prefrac*((1. - xfrac)*HydroCell_3D_ideal_ptr1->
temperature
928 ed += prefrac*((1. - xfrac)*HydroCell_3D_ideal_ptr1->
ed
929 + xfrac*HydroCell_3D_ideal_ptr2->
ed);
930 p += prefrac*((1. - xfrac)*HydroCell_3D_ideal_ptr1->
pressure
931 + xfrac*HydroCell_3D_ideal_ptr2->
pressure);
932 ux += prefrac*((1. - xfrac)*HydroCell_3D_ideal_ptr1->
ux
933 + xfrac*HydroCell_3D_ideal_ptr2->
ux);
934 uy += prefrac*((1. - xfrac)*HydroCell_3D_ideal_ptr1->
uy
935 + xfrac*HydroCell_3D_ideal_ptr2->
uy);
936 uz += prefrac*((1. - xfrac)*HydroCell_3D_ideal_ptr1->
uz
937 + xfrac*HydroCell_3D_ideal_ptr2->
uz);
943 if (hydroWhichHydro == 10) {
944 double ut = sqrt(1. + ux*ux + uy*uy + uz*uz);
948 }
else if (hydroWhichHydro == 11) {
949 double eta_local = 0.5*log((t + z)/(t - z));
950 double sinh_eta = sinh(eta_local);
951 double cosh_eta = cosh(eta_local);
953 double utau = sqrt(1. + ux*ux + uy*uy + ueta*ueta);
954 uz = utau*sinh_eta + ueta*cosh_eta;
955 double ut = utau*cosh_eta + ueta*sinh_eta;
959 }
else if (hydroWhichHydro == 8 || hydroWhichHydro == 9) {
960 double eta_local = 0.5*log((t + z)/(t - z));
961 double sinh_eta = sinh(eta_local);
962 double cosh_eta = cosh(eta_local);
963 double utau = sqrt(1. + ux*ux + uy*uy + ueta*ueta);
964 uz = utau*sinh_eta + ueta*cosh_eta;
965 double ut = utau*cosh_eta + ueta*sinh_eta;
976 if (hydroWhichHydro < 10) {
982 info->
sd = (ed +
p)/(T + 1
e-16);
986 info->
pi[0][0] = pi00;
987 info->
pi[0][1] = pi01;
988 info->
pi[0][2] = pi02;
989 info->
pi[0][3] = pi03;
990 info->
pi[1][0] = pi01;
991 info->
pi[1][1] = pi11;
992 info->
pi[1][2] = pi12;
993 info->
pi[1][3] = pi13;
994 info->
pi[2][0] = pi02;
995 info->
pi[2][1] = pi12;
996 info->
pi[2][2] = pi22;
997 info->
pi[2][3] = pi23;
998 info->
pi[3][0] = pi03;
999 info->
pi[3][1] = pi13;
1000 info->
pi[3][2] = pi23;
1001 info->
pi[3][3] = pi33;
1010 for (
int i = 0;
i < itaumax;
i++) {
1011 double tau = hydroTau0 +
i*hydroDtau;
1013 filename << filename_base <<
"_tau_" << tau <<
".dat";
1014 ofstream temp_evo(filename.str().c_str());
1015 for (
int ix = 0; ix < ixmax; ix++) {
1016 double x_local = -hydroXmax + ix*hydroDx;
1017 for (
int iy = 0; iy < ixmax; iy++) {
1018 double y_local = -hydroXmax + iy*hydroDx;
1019 getHydroValues(x_local, y_local, 0.0, tau, hydroInfo);
1021 temp_evo << scientific << setw(16) << setprecision(8)
1022 << temp_local <<
" ";
1034 double x_max,
double dx,
double eta_max,
double deta) {
1042 if (hydroWhichHydro == 8) {
1043 itaumax =
static_cast<int>((tau_max-
tau0)/dtau+0.001);
1044 ixmax =
static_cast<int>(2*x_max/dx+0.001);
1045 ietamax =
static_cast<int>(2*eta_max/deta+0.001);
1047 if (hydroWhichHydro == 6) {
1048 itaumax =
static_cast<int>((tau_max-
tau0)/dtau+0.001);
1049 ixmax =
static_cast<int>(2*x_max/dx+0.001);
1050 ietamax =
static_cast<int>(2*eta_max/deta+0.001);