18 hydro_type = paraRdr->
getVal(
"hydro_type");
19 if (hydro_type == 0) {
26 T_cut = paraRdr->getVal(
"T_cut");
32 hydro_type = paraRdr->
getVal(
"hydro_type");
33 if (hydro_type == 0) {
46 double y,
double dt,
double dx,
double dy,
51 double tau_low = tau - dt/2.;
52 double tau_high = tau + dt/2.;
53 double x_left = x - dx/2.;
54 double x_right = x + dx/2.;
55 double y_left = y - dy/2.;
56 double y_right = y + dy/2.;
58 if (hydro_type == 0) {
60 hydroinfo_ptr->getHydroinfo(tau_low, x_left, y_left, fluidCellptr);
63 hydroinfo_MUSIC_ptr->getHydroValues(x_left, y_left, 0.0, tau_low,
67 if (hydro_type == 0) {
69 hydroinfo_ptr->getHydroinfo(tau_low, x_left, y_right, fluidCellptr);
72 hydroinfo_MUSIC_ptr->getHydroValues(x_left, y_right, 0.0, tau_low,
76 if (hydro_type == 0) {
78 hydroinfo_ptr->getHydroinfo(tau_low, x_right, y_left, fluidCellptr);
81 hydroinfo_MUSIC_ptr->getHydroValues(x_right, y_left, 0.0, tau_low,
85 if (hydro_type == 0) {
87 hydroinfo_ptr->getHydroinfo(tau_low, x_right, y_right, fluidCellptr);
90 hydroinfo_MUSIC_ptr->getHydroValues(x_right, y_right, 0.0, tau_low,
94 if (hydro_type == 0) {
96 hydroinfo_ptr->getHydroinfo(tau_high, x_left, y_left, fluidCellptr);
99 hydroinfo_MUSIC_ptr->getHydroValues(x_left, y_left, 0.0, tau_high,
103 if (hydro_type == 0) {
105 hydroinfo_ptr->getHydroinfo(tau_high, x_left, y_right, fluidCellptr);
108 hydroinfo_MUSIC_ptr->getHydroValues(x_left, y_right, 0.0, tau_high,
112 if (hydro_type == 0) {
114 hydroinfo_ptr->getHydroinfo(tau_high, x_right, y_left, fluidCellptr);
117 hydroinfo_MUSIC_ptr->getHydroValues(x_right, y_left, 0.0, tau_high,
121 if (hydro_type == 0) {
123 hydroinfo_ptr->getHydroinfo(tau_high, x_right, y_right, fluidCellptr);
126 hydroinfo_MUSIC_ptr->getHydroValues(x_right, y_right, 0.0, tau_high,
131 if ((T_cut - cube[0][0][0])*(cube[1][1][1] - T_cut) < 0.0)
132 if ((T_cut - cube[0][1][0])*(cube[1][0][1] - T_cut) < 0.0)
133 if ((T_cut - cube[0][1][1])*(cube[1][0][0] - T_cut) < 0.0)
134 if ((T_cut - cube[0][0][1])*(cube[1][1][0] - T_cut) < 0.0)
143 output.open(
"hyper_surface_2+1d.dat");
145 double grid_tau0 = 0.0;
146 double grid_tauf = 0.0;
147 double grid_x0 = 0.0;
148 double grid_y0 = 0.0;
149 if (hydro_type == 1) {
151 grid_tau0 = hydroinfo_ptr->getHydrogridTau0();
152 grid_tauf = hydroinfo_ptr->getHydrogridTaumax();
153 grid_x0 = hydroinfo_ptr->getHydrogridX0();
154 grid_y0 = hydroinfo_ptr->getHydrogridY0();
157 grid_tau0 = hydroinfo_MUSIC_ptr->get_hydro_tau0();
158 grid_tauf = hydroinfo_MUSIC_ptr->get_hydro_tau_max();
159 grid_x0 = (- hydroinfo_MUSIC_ptr->get_hydro_x_max()
160 + hydroinfo_MUSIC_ptr->get_hydro_dx());
164 double grid_dt = paraRdr->getVal(
"grid_dt");
165 double grid_dx = paraRdr->getVal(
"grid_dx");
166 double grid_dy = paraRdr->getVal(
"grid_dy");
169 double *lattice_spacing =
new double [
dim];
170 lattice_spacing[0] = grid_dt;
171 lattice_spacing[1] = grid_dx;
172 lattice_spacing[2] = grid_dy;
175 cornelius_ptr->
init(dim, T_cut, lattice_spacing);
177 int ntime =
static_cast<int>((grid_tauf - grid_tau0)/grid_dt);
178 int nx =
static_cast<int>(fabs(2.*grid_x0)/grid_dx);
179 int ny =
static_cast<int>(fabs(2.*grid_y0)/grid_dy);
181 double ***cube =
new double** [2];
182 for (
int i = 0;
i < 2;
i++) {
183 cube[
i] =
new double* [2];
184 for (
int j = 0;
j < 2;
j++) {
185 cube[
i][
j] =
new double [2];
186 for (
int k = 0;
k < 2;
k++)
193 for (
int itime = 0; itime < ntime; itime++) {
195 double tau_local = grid_tau0 + (itime + 0.5)*grid_dt;
196 for (
int i = 0;
i <
nx;
i++) {
198 double x_local = grid_x0 + (
i + 0.5)*grid_dx;
199 for (
int j = 0;
j <
ny;
j++) {
200 double y_local = grid_y0 + (
j + 0.5)*grid_dy;
201 bool intersect = check_intersect(T_cut, tau_local, x_local,
202 y_local, grid_dt, grid_dx,
208 double tau_center = (
210 + tau_local - grid_dt/2.);
213 + x_local - grid_dx/2.);
216 + y_local - grid_dy/2.);
223 if (hydro_type == 1) {
225 hydroinfo_ptr->getHydroinfo(
226 tau_center, x_center, y_center, fluidCellptr);
229 hydroinfo_MUSIC_ptr->getHydroValues(
230 x_center, y_center, 0.0, tau_center,
234 output << scientific << setw(18) << setprecision(8)
235 << tau_center <<
" " << x_center <<
" "
237 << da_tau <<
" " << da_x <<
" "
240 << fluidCellptr->
vx <<
" " << fluidCellptr->
vy
251 delete cornelius_ptr;
252 delete [] lattice_spacing;
253 for (
int i = 0;
i < 2;
i++) {
254 for (
int j = 0;
j < 2;
j++)
255 delete [] cube[
i][
j];