Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Hydroinfo_h5.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Hydroinfo_h5.h
1
#ifndef Hydroinfo_h5_H
2
#define Hydroinfo_h5_H
3
4
#include<fstream>
5
#include<sstream>
6
#include<string>
7
#include<vector>
8
9
#include "hdf5.h"
10
#include "
fluidCell.h
"
11
12
// using namespace std;
13
using
std::string
;
14
using
std::vector;
15
using
std::ofstream;
16
using
std::ifstream;
17
using
std::abs;
18
19
class
HydroinfoH5
20
{
21
private
:
22
int
readinFlag
;
23
int
outputFlag
;
24
25
string
filename
;
26
27
int
Visflag
;
// flag to determine whether to read evolutions for viscous variables
28
int
Buffersize
;
29
hid_t
H5file_id
,
H5groupEventid
;
30
31
int
grid_XL
,
grid_XH
,
grid_YL
,
grid_YH
;
32
int
grid_Framenum
;
33
double
grid_X0
,
grid_Y0
;
34
double
grid_Xmax
,
grid_Ymax
;
35
double
grid_Tau0
,
grid_dTau
,
grid_dx
,
grid_dy
;
36
double
grid_Taumax
;
37
38
int
grid_LSX
,
grid_LSY
,
grid_LST
;
39
int
LST_cur
;
40
41
int
dimensionX
,
dimensionY
;
42
double
***
ed
, ***
sd
, ***
vx
, ***
vy
, ***
Temperature
, ***
Pressure
;
43
double
***
pi00
, ***
pi01
, ***
pi02
, ***
pi03
, ***
pi11
, ***
pi12
, ***
pi13
;
44
double
***
pi22
, ***
pi23
, ***
pi33
;
45
double
***
BulkPi
;
46
47
public
:
48
HydroinfoH5
();
49
HydroinfoH5
(
string
filename_in,
int
bufferSize_in,
int
Visflag_in);
50
HydroinfoH5
(
int
XL_in,
int
XH_in,
double
DX_in,
int
LSX_in,
51
int
YL_in,
int
YH_in,
double
DY_in,
int
LSY_in,
52
double
Tau0_in,
double
dTau_in,
double
LST_in,
53
int
Visflag_in,
string
filename_in);
54
55
~HydroinfoH5
();
56
58
void
clean_hydro_event
();
59
60
// functions to write into hdf5 file
61
void
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);
62
void
writeGroupattribute
(hid_t
H5groupEventid
);
63
void
addGroupattributeInt
(hid_t
H5groupEventid
,
string
attName,
int
attValue);
64
void
addGroupattributeDouble
(hid_t
H5groupEventid
,
string
attName,
double
attValue);
65
void
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);
66
void
CSH5dumpBlockdata
(hid_t group_id,
const
hsize_t * dims,
string
DatasetName,
double
** Dataset);
67
68
// functions to read hdf5 files
69
void
readHydroinfoH5
(
string
filename
,
int
bufferSize_in,
int
Visflag_in);
70
void
readHydrogridInfo
();
71
void
printHydrogridInfo
();
72
int
readH5Attribute_int
(hid_t
id
,
string
attributeName);
73
double
readH5Attribute_double
(hid_t
id
,
string
attributeName);
74
75
void
readHydroinfoBuffered_total
();
76
void
readHydroinfoSingleframe
(
int
frameIdx);
77
void
readH5Dataset_double
(hid_t
id
,
string
datasetName,
double
** dset_data);
78
79
int
getNumberofFrames
() {
return
((
int
)
grid_Framenum
);};
80
double
getHydrogridDX
() {
return
(
grid_dx
);};
81
double
getHydrogridDY
() {
return
(
grid_dy
);};
82
double
getHydrogridDTau
() {
return
(
grid_dTau
);};
83
double
getHydrogridTau0
() {
return
(
grid_Tau0
);};
84
double
getHydrogridTaumax
() {
return
(
grid_Taumax
);};
85
double
getHydrogridNX
() {
return
(
grid_XH
-
grid_XL
+ 1);};
86
double
getHydrogridNY
() {
return
(
grid_YH
-
grid_YL
+ 1);};
87
double
getHydrogridX0
() {
return
(
grid_X0
);};
88
double
getHydrogridY0
() {
return
(
grid_Y0
);};
89
double
getHydrogridXmax
() {
return
(
grid_Xmax
);};
90
double
getHydrogridYmax
() {
return
(
grid_Ymax
);};
91
void
getHydroinfoOnlattice
(
int
frameIdx,
int
xIdx,
int
yIdx,
hydrofluidCell
* fluidCellptr);
92
void
getHydroinfo
(
double
tau
,
double
x
,
double
y
,
hydrofluidCell
* fluidCellptr);
93
void
setZero_fluidCell
(
hydrofluidCell
* fluidCellptr);
94
95
double
cubeInterpShell
(
int
idx_x,
int
idx_y,
int
idx_z,
96
double
x
,
double
y
,
double
z
,
double
***
dataset
);
97
double
cubeInterp
(
double
x
,
double
y
,
double
z
,
98
double
A000,
double
A100,
double
A010,
double
A110,
99
double
A001,
double
A101,
double
A011,
double
A111);
100
};
101
102
#endif
JETSCAPE
blob
main
external_packages
hydro_from_external_file
Hydroinfo_h5.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:24
using
1.8.2 with
sPHENIX GitHub integration