20 #include "cornelius.h"
28 : bulk_info(bulk_data) {
31 JSINFO <<
"Find a surface with temperature T = " <<
T_cut;
34 JSINFO <<
"Hydro medium is boost invariant.";
36 JSINFO <<
"Hydro medium is not boost invariant.";
45 JSINFO <<
"Finding a 2+1D hyper-surface at T = " <<
T_cut <<
" GeV ...";
48 JSINFO <<
"Finding a 3+1D hyper-surface at T = " <<
T_cut <<
" GeV ...";
59 auto tau_low = tau - dt / 2.;
60 auto tau_high = tau + dt / 2.;
61 auto x_left = x - dx / 2.;
62 auto x_right = x + dx / 2.;
63 auto y_left = y - dy / 2.;
64 auto y_right = y + dy / 2.;
66 auto fluid_cell =
bulk_info.
get(tau_low, x_left, y_left, 0.0);
68 fluid_cell =
bulk_info.
get(tau_low, x_left, y_right, 0.0);
70 fluid_cell =
bulk_info.
get(tau_low, x_right, y_left, 0.0);
72 fluid_cell =
bulk_info.
get(tau_low, x_right, y_right, 0.0);
74 fluid_cell =
bulk_info.
get(tau_high, x_left, y_left, 0.0);
76 fluid_cell =
bulk_info.
get(tau_high, x_left, y_right, 0.0);
78 fluid_cell =
bulk_info.
get(tau_high, x_right, y_left, 0.0);
80 fluid_cell =
bulk_info.
get(tau_high, x_right, y_right, 0.0);
83 if ((
T_cut - cube[0][0][0]) * (cube[1][1][1] -
T_cut) < 0.0)
84 if ((
T_cut - cube[0][1][0]) * (cube[1][0][1] -
T_cut) < 0.0)
85 if ((
T_cut - cube[0][1][1]) * (cube[1][0][0] -
T_cut) < 0.0)
86 if ((
T_cut - cube[0][0][1]) * (cube[1][1][0] -
T_cut) < 0.0)
104 double lattice_spacing[
dim];
105 lattice_spacing[0] = grid_dt;
106 lattice_spacing[1] = grid_dx;
107 lattice_spacing[2] = grid_dy;
109 std::unique_ptr<Cornelius> cornelius_ptr(
new Cornelius());
110 cornelius_ptr->
init(dim,
T_cut, lattice_spacing);
112 const int ntime =
static_cast<int>((grid_tauf - grid_tau0) / grid_dt);
113 const int nx =
static_cast<int>(std::abs(2. * grid_x0) / grid_dx);
114 const int ny =
static_cast<int>(std::abs(2. * grid_y0) / grid_dy);
116 double ***cube =
new double **[2];
117 for (
int i = 0;
i < 2;
i++) {
118 cube[
i] =
new double *[2];
119 for (
int j = 0;
j < 2;
j++) {
120 cube[
i][
j] =
new double[2];
121 for (
int k = 0;
k < 2;
k++)
126 for (
int itime = 0; itime < ntime; itime++) {
128 auto tau_local = grid_tau0 + (itime + 0.5) * grid_dt;
129 for (
int i = 0;
i <
nx;
i++) {
131 auto x_local = grid_x0 + (
i + 0.5) * grid_dx;
132 for (
int j = 0;
j <
ny;
j++) {
133 auto y_local = grid_y0 + (
j + 0.5) * grid_dy;
135 grid_dt, grid_dx, grid_dy, cube);
138 for (
int isurf = 0; isurf < cornelius_ptr->
get_Nelements(); isurf++) {
140 tau_local - grid_dt / 2.);
142 x_local - grid_dx / 2.);
144 y_local - grid_dy / 2.);
154 da_x, da_y, 0.0, fluid_cell);
162 for (
int i = 0;
i < 2;
i++) {
163 for (
int j = 0;
j < 2;
j++)
178 auto tau_low = tau - dt / 2.;
179 auto tau_high = tau + dt / 2.;
180 auto x_left = x - dx / 2.;
181 auto x_right = x + dx / 2.;
182 auto y_left = y - dy / 2.;
183 auto y_right = y + dy / 2.;
184 auto eta_left = eta - deta / 2.;
185 auto eta_right = eta + deta / 2.;
187 auto fluid_cell =
bulk_info.
get(tau_low, x_left, y_left, eta_left);
189 fluid_cell =
bulk_info.
get(tau_low, x_left, y_left, eta_right);
191 fluid_cell =
bulk_info.
get(tau_low, x_left, y_right, eta_left);
193 fluid_cell =
bulk_info.
get(tau_low, x_left, y_right, eta_right);
195 fluid_cell =
bulk_info.
get(tau_low, x_right, y_left, eta_left);
197 fluid_cell =
bulk_info.
get(tau_low, x_right, y_left, eta_right);
199 fluid_cell =
bulk_info.
get(tau_low, x_right, y_right, eta_left);
201 fluid_cell =
bulk_info.
get(tau_low, x_right, y_right, eta_right);
203 fluid_cell =
bulk_info.
get(tau_high, x_left, y_left, eta_left);
205 fluid_cell =
bulk_info.
get(tau_high, x_left, y_left, eta_right);
207 fluid_cell =
bulk_info.
get(tau_high, x_left, y_right, eta_left);
209 fluid_cell =
bulk_info.
get(tau_high, x_left, y_right, eta_right);
211 fluid_cell =
bulk_info.
get(tau_high, x_right, y_left, eta_left);
213 fluid_cell =
bulk_info.
get(tau_high, x_right, y_left, eta_right);
215 fluid_cell =
bulk_info.
get(tau_high, x_right, y_right, eta_left);
217 fluid_cell =
bulk_info.
get(tau_high, x_right, y_right, eta_right);
220 if ((
T_cut - cube[0][0][0][0]) * (cube[1][1][1][1] -
T_cut) < 0.0)
221 if ((
T_cut - cube[0][0][1][1]) * (cube[1][1][0][0] -
T_cut) < 0.0)
222 if ((
T_cut - cube[0][1][0][1]) * (cube[1][0][1][0] -
T_cut) < 0.0)
223 if ((
T_cut - cube[0][1][1][0]) * (cube[1][0][0][1] -
T_cut) < 0.0)
224 if ((
T_cut - cube[0][0][0][1]) * (cube[1][1][1][0] -
T_cut) < 0.0)
225 if ((
T_cut - cube[0][0][1][0]) * (cube[1][1][0][1] -
T_cut) < 0.0)
226 if ((
T_cut - cube[0][1][0][0]) * (cube[1][0][1][1] -
T_cut) < 0.0)
227 if ((
T_cut - cube[0][1][1][1]) * (cube[1][0][0][0] -
T_cut) <
249 double lattice_spacing[
dim];
250 lattice_spacing[0] = grid_dt;
251 lattice_spacing[1] = grid_dx;
252 lattice_spacing[2] = grid_dy;
253 lattice_spacing[3] = grid_deta;
255 std::unique_ptr<Cornelius> cornelius_ptr(
new Cornelius());
256 cornelius_ptr->
init(dim,
T_cut, lattice_spacing);
258 const int ntime =
static_cast<int>((grid_tauf - grid_tau0) / grid_dt);
259 const int nx =
static_cast<int>(std::abs(2. * grid_x0) / grid_dx);
260 const int ny =
static_cast<int>(std::abs(2. * grid_y0) / grid_dy);
261 const int neta =
static_cast<int>(std::abs(2. * grid_eta0) / grid_deta);
263 double ****cube =
new double ***[2];
264 for (
int i = 0;
i < 2;
i++) {
265 cube[
i] =
new double **[2];
266 for (
int j = 0;
j < 2;
j++) {
267 cube[
i][
j] =
new double *[2];
268 for (
int k = 0;
k < 2;
k++) {
269 cube[
i][
j][
k] =
new double[2];
270 for (
int l = 0; l < 2; l++) {
271 cube[
i][
j][
k][l] = 0.0;
277 for (
int itime = 0; itime < ntime; itime++) {
279 auto tau_local = grid_tau0 + (itime + 0.5) * grid_dt;
280 for (
int l = 0; l < neta; l++) {
281 auto eta_local = grid_eta0 + (l + 0.5) * grid_deta;
283 for (
int i = 0;
i <
nx;
i++) {
285 auto x_local = grid_x0 + (
i + 0.5) * grid_dx;
286 for (
int j = 0;
j <
ny;
j++) {
287 auto y_local = grid_y0 + (
j + 0.5) * grid_dy;
290 grid_dt, grid_dx, grid_dy, grid_deta, cube);
296 tau_local - grid_dt / 2.);
298 x_local - grid_dx / 2.);
300 y_local - grid_dy / 2.);
302 eta_local - grid_deta / 2.);
310 bulk_info.
get(tau_center, x_center, y_center, eta_center);
312 tau_center, x_center, y_center, eta_center, da_tau, da_x,
313 da_y, da_eta, fluid_cell);
322 for (
int i = 0;
i < 2;
i++) {
323 for (
int j = 0;
j < 2;
j++) {
324 for (
int k = 0;
k < 2;
k++) {
325 delete[] cube[
i][
j][
k];
358 temp_cell.
vx = fluid_cell.
vx;
359 temp_cell.
vy = fluid_cell.
vy;
360 temp_cell.
vz = fluid_cell.
vz;
362 for (
int i = 0;
i < 4;
i++) {
363 for (
int j = 0;
j < 4;
j++) {
364 temp_cell.
pi[
i][
j] = fluid_cell.
pi[
i][
j];