20 int bufferSize_in,
int Visflag_in) {
21 readHydroinfoH5(filename_in, bufferSize_in, Visflag_in);
25 int YL_in,
int YH_in,
double DY_in,
int LSY_in,
26 double Tau0_in,
double dTau_in,
double LST_in,
27 int Visflag_in,
string filename_in) {
28 setHydroFiles(XL_in, XH_in, DX_in, LSX_in, YL_in, YH_in, DY_in, LSY_in,
29 Tau0_in, dTau_in, LST_in, Visflag_in, filename_in);
33 if (readinFlag == 1) {
39 for (
int i=0;
i<Buffersize;
i++) {
40 for (
int j=0;
j<dimensionX;
j++) {
45 delete[] Temperature[
i][
j];
46 delete[] Pressure[
i][
j];
58 delete[] BulkPi[
i][
j];
65 delete[] Temperature[
i];
103 void HydroinfoH5::setHydroFiles(
int XL_in,
int XH_in,
double DX_in,
int LSX_in,
int YL_in,
int YH_in,
double DY_in,
int LSY_in,
double Tau0_in,
double dTau_in,
double LST_in,
int Visflag_in,
string filename_in)
117 LST_cur = grid_LST - 1;
118 Visflag = Visflag_in;
120 int XShift = abs(grid_XL%grid_LSX);
121 int YShift = abs(grid_YL%grid_LSY);
122 dimensionX = (int) (grid_XH - grid_XL - 2*XShift)/grid_LSX + 1;
123 dimensionY = (int) (grid_YH - grid_YL - 2*YShift)/grid_LSY + 1;
128 H5file_id = H5Fcreate(
filename.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
131 H5groupEventid = H5Gcreate(H5file_id,
"/Event", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
133 writeGroupattribute(H5groupEventid);
136 status = H5Gclose(H5groupEventid);
138 status = H5Fclose(H5file_id);
143 int XShift = abs(grid_XL%grid_LSX);
144 int YShift = abs(grid_YL%grid_LSY);
146 addGroupattributeInt(H5groupEventid,
"XL", (grid_XL + XShift)/grid_LSX);
147 addGroupattributeInt(H5groupEventid,
"XH", (grid_XH - XShift)/grid_LSX);
148 addGroupattributeInt(H5groupEventid,
"YL", (grid_YL + YShift)/grid_LSY);
149 addGroupattributeInt(H5groupEventid,
"YH", (grid_YH - YShift)/grid_LSY);
150 addGroupattributeDouble(H5groupEventid,
"DX", grid_dx*grid_LSX);
151 addGroupattributeDouble(H5groupEventid,
"DY", grid_dy*grid_LSY);
152 addGroupattributeDouble(H5groupEventid,
"Tau0", grid_Tau0);
153 addGroupattributeDouble(H5groupEventid,
"dTau", grid_dTau*grid_LST);
154 addGroupattributeInt(H5groupEventid,
"OutputViscousFlag", Visflag);
161 hid_t attribute_id, dataspace_id;
165 dataspace_id = H5Screate_simple(1, &dims, NULL);
167 attribute_id = H5Acreate (H5groupEventid, attName.c_str(), H5T_STD_I32BE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT);
170 status = H5Awrite(attribute_id, H5T_NATIVE_INT, &attValue);
173 status = H5Aclose(attribute_id);
175 status = H5Sclose(dataspace_id);
182 hid_t attribute_id, dataspace_id;
186 dataspace_id = H5Screate_simple(1, &dims, NULL);
188 attribute_id = H5Acreate (H5groupEventid, attName.c_str(), H5T_NATIVE_DOUBLE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT);
191 status = H5Awrite(attribute_id, H5T_NATIVE_DOUBLE, &attValue);
194 status = H5Aclose(attribute_id);
196 status = H5Sclose(dataspace_id);
199 void HydroinfoH5::writeHydroBlock(
int Time_id,
double **ed_in,
double **sd_in,
double **p_in,
double **Temp_in,
double **Vx_in,
double **Vy_in,
double **Pi00_in,
double **Pi01_in,
double **Pi02_in,
double **Pi03_in,
double **Pi11_in,
double **Pi12_in,
double **Pi13_in,
double **Pi22_in,
double **Pi23_in,
double **Pi33_in,
double ** BulkPi_in)
207 LST_cur = grid_LST - 1;
211 hsize_t dim_x = dimensionX;
212 hsize_t dim_y = dimensionY;
213 const hsize_t dims[2] = {dim_x, dim_y};
215 int XShift = abs(grid_XL%grid_LSX);
216 int YShift = abs(grid_YL%grid_LSY);
218 int Frame_id = (int) Time_id/grid_LST;
219 ostringstream frameName;
220 frameName <<
"Frame_" << setfill(
'0') << setw(4) << Frame_id;
223 H5file_id = H5Fopen(
filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT);
224 H5groupEventid = H5Gopen(H5file_id,
"/Event", H5P_DEFAULT);
227 groupFrameid = H5Gcreate(H5groupEventid, frameName.str().c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
228 addGroupattributeDouble(groupFrameid,
"Time", grid_Tau0 + grid_dTau*grid_LST*Frame_id);
231 CSH5dumpBlockdata(groupFrameid, dims,
"e", ed_in);
232 CSH5dumpBlockdata(groupFrameid, dims,
"s", sd_in);
233 CSH5dumpBlockdata(groupFrameid, dims,
"p", p_in);
234 CSH5dumpBlockdata(groupFrameid, dims,
"Temp", Temp_in);
235 CSH5dumpBlockdata(groupFrameid, dims,
"Vx", Vx_in);
236 CSH5dumpBlockdata(groupFrameid, dims,
"Vy", Vy_in);
239 CSH5dumpBlockdata(groupFrameid, dims,
"Pi00", Pi00_in);
240 CSH5dumpBlockdata(groupFrameid, dims,
"Pi01", Pi01_in);
241 CSH5dumpBlockdata(groupFrameid, dims,
"Pi02", Pi02_in);
242 CSH5dumpBlockdata(groupFrameid, dims,
"Pi03", Pi03_in);
243 CSH5dumpBlockdata(groupFrameid, dims,
"Pi11", Pi11_in);
244 CSH5dumpBlockdata(groupFrameid, dims,
"Pi12", Pi12_in);
245 CSH5dumpBlockdata(groupFrameid, dims,
"Pi13", Pi13_in);
246 CSH5dumpBlockdata(groupFrameid, dims,
"Pi22", Pi22_in);
247 CSH5dumpBlockdata(groupFrameid, dims,
"Pi23", Pi23_in);
248 CSH5dumpBlockdata(groupFrameid, dims,
"Pi33", Pi33_in);
249 CSH5dumpBlockdata(groupFrameid, dims,
"BulkPi", BulkPi_in);
252 status = H5Gclose(H5groupEventid);
253 status = H5Fclose(H5file_id);
258 hid_t dataset_id, dataspace_id;
261 int XShift = abs(grid_XL%grid_LSX);
262 int YShift = abs(grid_YL%grid_LSY);
264 double subDataset[dims[0]][dims[1]];
265 for(
int i = 0;
i < dims[0];
i++)
267 int idx_x = XShift +
i*grid_LSX;
268 for(
int j = 0;
j < dims[1];
j++)
270 int idx_y = YShift +
j*grid_LSY;
271 subDataset[
i][
j] = Dataset[idx_x][idx_y];
275 dataspace_id = H5Screate_simple(2, dims, NULL);
277 dataset_id = H5Dcreate(group_id, DatasetName.c_str(), H5T_NATIVE_DOUBLE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
279 status = H5Dwrite(dataset_id, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, subDataset);
282 status = H5Dclose(dataset_id);
284 status = H5Sclose(dataspace_id);
292 Visflag = Visflag_in;
296 const char *fileptr = (
char*)
filename.c_str();
297 H5file_id = H5Fopen(fileptr, H5F_ACC_RDONLY, H5P_DEFAULT);
298 H5groupEventid = H5Gopen(H5file_id,
"/Event", H5P_DEFAULT);
301 printHydrogridInfo();
303 Buffersize = bufferSize_in;
304 dimensionX = grid_XH - grid_XL + 1;
305 dimensionY = grid_YH - grid_YL + 1;
307 if(Buffersize < grid_Framenum)
309 cout <<
"Buffersize is too small, increase it to at lease to " << grid_Framenum << endl;
313 ed =
new double** [Buffersize];
314 sd =
new double** [Buffersize];
315 vx =
new double** [Buffersize];
316 vy =
new double** [Buffersize];
317 Temperature =
new double** [Buffersize];
318 Pressure =
new double** [Buffersize];
320 pi00 =
new double** [Buffersize];
321 pi01 =
new double** [Buffersize];
322 pi02 =
new double** [Buffersize];
323 pi03 =
new double** [Buffersize];
324 pi11 =
new double** [Buffersize];
325 pi12 =
new double** [Buffersize];
326 pi13 =
new double** [Buffersize];
327 pi22 =
new double** [Buffersize];
328 pi23 =
new double** [Buffersize];
329 pi33 =
new double** [Buffersize];
330 BulkPi =
new double** [Buffersize];
332 for(
int i=0;
i<Buffersize;
i++)
334 ed[
i] =
new double* [dimensionX];
335 sd[
i] =
new double* [dimensionX];
336 vx[
i] =
new double* [dimensionX];
337 vy[
i] =
new double* [dimensionX];
338 Temperature[
i] =
new double* [dimensionX];
339 Pressure[
i] =
new double* [dimensionX];
341 pi00[
i] =
new double* [dimensionX];
342 pi01[
i] =
new double* [dimensionX];
343 pi02[
i] =
new double* [dimensionX];
344 pi03[
i] =
new double* [dimensionX];
345 pi11[
i] =
new double* [dimensionX];
346 pi12[
i] =
new double* [dimensionX];
347 pi13[
i] =
new double* [dimensionX];
348 pi22[
i] =
new double* [dimensionX];
349 pi23[
i] =
new double* [dimensionX];
350 pi33[
i] =
new double* [dimensionX];
351 BulkPi[
i] =
new double* [dimensionX];
353 for(
int j=0;
j<dimensionX;
j++)
355 ed[
i][
j] =
new double [dimensionY];
356 sd[
i][
j] =
new double [dimensionY];
357 vx[
i][
j] =
new double [dimensionY];
358 vy[
i][
j] =
new double [dimensionY];
359 Temperature[
i][
j] =
new double [dimensionY];
360 Pressure[
i][
j] =
new double [dimensionY];
362 pi00[
i][
j] =
new double [dimensionY];
363 pi01[
i][
j] =
new double [dimensionY];
364 pi02[
i][
j] =
new double [dimensionY];
365 pi03[
i][
j] =
new double [dimensionY];
366 pi11[
i][
j] =
new double [dimensionY];
367 pi12[
i][
j] =
new double [dimensionY];
368 pi13[
i][
j] =
new double [dimensionY];
369 pi22[
i][
j] =
new double [dimensionY];
370 pi23[
i][
j] =
new double [dimensionY];
371 pi33[
i][
j] =
new double [dimensionY];
372 BulkPi[
i][
j] =
new double [dimensionY];
377 readHydroinfoBuffered_total();
379 status = H5Gclose(H5groupEventid);
380 status = H5Fclose(H5file_id);
388 grid_XL = readH5Attribute_int(H5groupEventid,
"XL");
389 grid_XH = readH5Attribute_int(H5groupEventid,
"XH");
390 grid_YL = readH5Attribute_int(H5groupEventid,
"YL");
391 grid_YH = readH5Attribute_int(H5groupEventid,
"YH");
392 grid_Tau0 = readH5Attribute_double(H5groupEventid,
"Tau0");
393 grid_dTau = readH5Attribute_double(H5groupEventid,
"dTau");
394 grid_dx = readH5Attribute_double(H5groupEventid,
"DX");
395 grid_dy = readH5Attribute_double(H5groupEventid,
"DY");
397 grid_X0 = grid_XL * grid_dx;
398 grid_Y0 = grid_YL * grid_dy;
399 grid_Xmax = grid_XH * grid_dx;
400 grid_Ymax = grid_YH * grid_dy;
402 hsize_t tempFramenum;
403 status = H5Gget_num_objs(H5groupEventid, &tempFramenum);
404 grid_Framenum = (int) tempFramenum;
405 grid_Taumax = grid_Tau0 + (grid_Framenum - 1)*grid_dTau;
407 int tempflag = readH5Attribute_int(H5groupEventid,
"OutputViscousFlag");
408 Visflag = Visflag*tempflag;
413 cout <<
"-----------------------------------------" << endl;
414 cout <<
"-----------hydro grid info---------------" << endl;
415 cout <<
"-----------------------------------------" << endl;
416 cout <<
"XL = " << grid_XL << endl;
417 cout <<
"XH = " << grid_XH << endl;
418 cout <<
"DX = " << grid_dx <<
" fm" << endl;
419 cout <<
"YL = " << grid_YL << endl;
420 cout <<
"YH = " << grid_YH << endl;
421 cout <<
"DY = " << grid_dy <<
" fm" << endl;
422 cout <<
"Tau0 = " << grid_Tau0 <<
" fm" << endl;
423 cout <<
"dTau = " << grid_dTau <<
" fm" << endl;
424 cout <<
"Number of Frames: " << grid_Framenum << endl;
425 cout <<
"Taumax = " << grid_Taumax <<
" fm" << endl;
426 cout <<
"Read in viscous information? ";
428 cout <<
" Yes!" << endl;
430 cout <<
" No!" << endl;
431 cout <<
"-----------------------------------------" << endl;
439 attr = H5Aopen_name(
id, attributeName.c_str());
440 ret = H5Aread(attr, H5T_NATIVE_INT, &attributeValue);
441 ret = H5Aclose(attr);
442 return(attributeValue);
447 double attributeValue;
450 attr = H5Aopen_name(
id, attributeName.c_str());
451 ret = H5Aread(attr, H5T_NATIVE_DOUBLE, &attributeValue);
452 ret = H5Aclose(attr);
453 return(attributeValue);
462 for(
int i=0;
i<Buffersize;
i++)
465 if(frameIdx < (
int) grid_Framenum)
467 stringstream frameName;
468 frameName <<
"Frame_" << setw(4) << setfill(
'0') << frameIdx;
469 group_id = H5Gopen(H5groupEventid, frameName.str().c_str(), H5P_DEFAULT);
471 readH5Dataset_double(group_id,
"e", ed[
i]);
472 readH5Dataset_double(group_id,
"s", sd[i]);
473 readH5Dataset_double(group_id,
"Vx",
vx[i]);
474 readH5Dataset_double(group_id,
"Vy",
vy[i]);
475 readH5Dataset_double(group_id,
"Temp", Temperature[i]);
476 readH5Dataset_double(group_id,
"P", Pressure[i]);
479 readH5Dataset_double(group_id,
"Pi00", pi00[i]);
480 readH5Dataset_double(group_id,
"Pi01", pi01[i]);
481 readH5Dataset_double(group_id,
"Pi02", pi02[i]);
482 readH5Dataset_double(group_id,
"Pi03", pi03[i]);
483 readH5Dataset_double(group_id,
"Pi11", pi11[i]);
484 readH5Dataset_double(group_id,
"Pi12", pi12[i]);
485 readH5Dataset_double(group_id,
"Pi13", pi13[i]);
486 readH5Dataset_double(group_id,
"Pi22", pi22[i]);
487 readH5Dataset_double(group_id,
"Pi23", pi23[i]);
488 readH5Dataset_double(group_id,
"Pi33", pi33[i]);
489 readH5Dataset_double(group_id,
"BulkPi", BulkPi[i]);
491 status = H5Gclose(group_id);
503 if(frameIdx < (
int) grid_Framenum)
505 stringstream frameName;
506 frameName <<
"Frame_" << setw(4) << setfill(
'0') << frameIdx;
507 group_id = H5Gopen(H5groupEventid, frameName.str().c_str(), H5P_DEFAULT);
511 readH5Dataset_double(group_id,
"e", ed[Idx]);
512 readH5Dataset_double(group_id,
"s", sd[Idx]);
513 readH5Dataset_double(group_id,
"Vx",
vx[Idx]);
514 readH5Dataset_double(group_id,
"Vy",
vy[Idx]);
515 readH5Dataset_double(group_id,
"Temp", Temperature[Idx]);
516 readH5Dataset_double(group_id,
"P", Pressure[Idx]);
519 readH5Dataset_double(group_id,
"Pi00", pi00[Idx]);
520 readH5Dataset_double(group_id,
"Pi01", pi01[Idx]);
521 readH5Dataset_double(group_id,
"Pi02", pi02[Idx]);
522 readH5Dataset_double(group_id,
"Pi03", pi03[Idx]);
523 readH5Dataset_double(group_id,
"Pi11", pi11[Idx]);
524 readH5Dataset_double(group_id,
"Pi12", pi12[Idx]);
525 readH5Dataset_double(group_id,
"Pi13", pi13[Idx]);
526 readH5Dataset_double(group_id,
"Pi22", pi22[Idx]);
527 readH5Dataset_double(group_id,
"Pi23", pi23[Idx]);
528 readH5Dataset_double(group_id,
"Pi33", pi33[Idx]);
529 readH5Dataset_double(group_id,
"BulkPi", BulkPi[Idx]);
531 status = H5Gclose(group_id);
535 cout <<
"Error: readHydroinfoSingleframe :: frameIdx exceed maximum frame number from hydro" << endl;
536 cout <<
"frameIdx = " << frameIdx << endl;
546 double temp_data[dimensionX][dimensionY];
547 dataset_id = H5Dopen(
id, datasetName.c_str(), H5P_DEFAULT);
548 status = H5Dread(dataset_id, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, temp_data);
549 for(
int i=0;
i<dimensionX;
i++)
550 for(
int j=0;
j<dimensionY;
j++)
551 dset_data[
i][
j] = temp_data[
i][
j];
552 status = H5Dclose(dataset_id);
557 if(frameIdx < 0 || frameIdx > grid_Framenum || xIdx < 0 || xIdx > (grid_XH - grid_XL) || yIdx < 0 || yIdx > (grid_YH - grid_YL))
559 cout <<
"Error: getHydroinfoOnlattice:: Index is wrong" << endl;
560 cout <<
"frameIdx = " << frameIdx <<
" xIdx = " << xIdx
561 <<
"yIdx = " << yIdx << endl;
564 fluidCellptr->
ed = ed[frameIdx][xIdx][yIdx];
565 fluidCellptr->
sd = sd[frameIdx][xIdx][yIdx];
566 fluidCellptr->
vx =
vx[frameIdx][xIdx][yIdx];
567 fluidCellptr->
vy =
vy[frameIdx][xIdx][yIdx];
568 fluidCellptr->
temperature = Temperature[frameIdx][xIdx][yIdx];
569 fluidCellptr->
pressure = Pressure[frameIdx][xIdx][yIdx];
570 fluidCellptr->
pi[0][0] = pi00[frameIdx][xIdx][yIdx];
571 fluidCellptr->
pi[0][1] = pi01[frameIdx][xIdx][yIdx];
572 fluidCellptr->
pi[0][2] = pi02[frameIdx][xIdx][yIdx];
573 fluidCellptr->
pi[0][3] = pi03[frameIdx][xIdx][yIdx];
574 fluidCellptr->
pi[1][0] = fluidCellptr->
pi[0][1];
575 fluidCellptr->
pi[1][1] = pi11[frameIdx][xIdx][yIdx];
576 fluidCellptr->
pi[1][2] = pi12[frameIdx][xIdx][yIdx];
577 fluidCellptr->
pi[1][3] = pi13[frameIdx][xIdx][yIdx];
578 fluidCellptr->
pi[2][0] = fluidCellptr->
pi[0][2];
579 fluidCellptr->
pi[2][1] = fluidCellptr->
pi[1][2];
580 fluidCellptr->
pi[2][2] = pi22[frameIdx][xIdx][yIdx];
581 fluidCellptr->
pi[2][3] = pi23[frameIdx][xIdx][yIdx];
582 fluidCellptr->
pi[3][0] = fluidCellptr->
pi[0][3];
583 fluidCellptr->
pi[3][1] = fluidCellptr->
pi[1][3];
584 fluidCellptr->
pi[3][2] = fluidCellptr->
pi[2][3];
585 fluidCellptr->
pi[3][3] = pi33[frameIdx][xIdx][yIdx];
586 fluidCellptr->
bulkPi = BulkPi[frameIdx][xIdx][yIdx];
593 if(tau < grid_Tau0 || tau > grid_Taumax-eps || x < grid_X0 || x > grid_Xmax-eps || y < grid_Y0 || y > grid_Ymax-eps)
595 setZero_fluidCell(fluidCellptr);
598 int frameIdx, xIdx, yIdx;
599 double tauInc, xInc, yInc;
602 temp = (tau - grid_Tau0)/grid_dTau;
603 frameIdx = (int) floor(temp);
604 tauInc = temp - frameIdx;
606 temp = (x - grid_X0)/grid_dx;
607 xIdx = (int) floor(temp);
610 temp = (y - grid_Y0)/grid_dy;
611 yIdx = (int) floor(temp);
614 fluidCellptr->
ed = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, ed);
615 fluidCellptr->
sd = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, sd);
616 fluidCellptr->
vx = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc,
vx);
617 fluidCellptr->
vy = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc,
vy);
618 fluidCellptr->
temperature = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, Temperature);
619 fluidCellptr->
pressure = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, Pressure);
622 fluidCellptr->
pi[0][0] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi00);
623 fluidCellptr->
pi[0][1] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi01);
624 fluidCellptr->
pi[0][2] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi02);
625 fluidCellptr->
pi[0][3] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi03);
626 fluidCellptr->
pi[1][0] = fluidCellptr->
pi[0][1];
627 fluidCellptr->
pi[1][1] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi11);
628 fluidCellptr->
pi[1][2] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi12);
629 fluidCellptr->
pi[1][3] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi13);
630 fluidCellptr->
pi[2][0] = fluidCellptr->
pi[0][2];
631 fluidCellptr->
pi[2][1] = fluidCellptr->
pi[1][2];
632 fluidCellptr->
pi[2][2] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi22);
633 fluidCellptr->
pi[2][3] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi23);
634 fluidCellptr->
pi[3][0] = fluidCellptr->
pi[0][3];
635 fluidCellptr->
pi[3][1] = fluidCellptr->
pi[1][3];
636 fluidCellptr->
pi[3][2] = fluidCellptr->
pi[2][3];
637 fluidCellptr->
pi[3][3] = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, pi33);
638 fluidCellptr->
bulkPi = cubeInterpShell(xIdx, yIdx, frameIdx, xInc, yInc, tauInc, BulkPi);
642 for(
int i=0;
i<4;
i++)
643 for(
int j=0;
j<4;
j++)
644 fluidCellptr->
pi[
i][
j] = 0.0e0;
645 fluidCellptr->
bulkPi = 0.0e0;
651 fluidCellptr->
ed = 0.0e0;
652 fluidCellptr->
sd = 0.0e0;
653 fluidCellptr->
vx = 0.0e0;
654 fluidCellptr->
vy = 0.0e0;
657 for(
int i=0;
i<4;
i++)
658 for(
int j=0;
j<4;
j++)
659 fluidCellptr->
pi[
i][
j] = 0.0e0;
660 fluidCellptr->
bulkPi = 0.0e0;
665 double result = cubeInterp(x, y, z,
666 dataset[idx_z][idx_x][idx_y], dataset[idx_z][idx_x+1][idx_y], dataset[idx_z][idx_x][idx_y+1], dataset[idx_z][idx_x+1][idx_y+1],
667 dataset[idx_z+1][idx_x][idx_y], dataset[idx_z+1][idx_x+1][idx_y], dataset[idx_z+1][idx_x][idx_y+1], dataset[idx_z+1][idx_x+1][idx_y+1]);
671 double HydroinfoH5::cubeInterp(
double x,
double y,
double z,
double A000,
double A100,
double A010,
double A110,
double A001,
double A101,
double A011,
double A111)
681 double Axyz = A000*(1-
x)*(1-y)*(1-
z) + A100*x*(1-y)*(1-
z)
682 + A010*(1-x)*y*(1-
z) + A001*(1-x)*(1-
y)*z
683 + A101*x*(1-y)*z + A011*(1-
x)*y*z + A110*x*y*(1-z)