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
FluidCellInfo.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FluidCellInfo.h
1
/*******************************************************************************
2
* Copyright (c) The JETSCAPE Collaboration, 2018
3
*
4
* Modular, task-based framework for simulating all aspects of heavy-ion collisions
5
*
6
* For the list of contributors see AUTHORS.
7
*
8
* Report issues at https://github.com/JETSCAPE/JETSCAPE/issues
9
*
10
* or via email to bugs.jetscape@gmail.com
11
*
12
* Distributed under the GNU General Public License 3.0 (GPLv3 or later).
13
* See COPYING for details.
14
******************************************************************************/
15
// This is a general basic class for hydrodynamics
16
17
#ifndef FLUIDCELLINFO_H
18
#define FLUIDCELLINFO_H
19
20
#include "
RealType.h
"
21
22
namespace
Jetscape {
23
24
class
FluidCellInfo
{
25
public
:
26
// data structure for outputing fluid cell information
27
Jetscape::real
energy_density
;
28
Jetscape::real
entropy_density
;
29
Jetscape::real
temperature
;
30
Jetscape::real
pressure
;
31
Jetscape::real
32
qgp_fraction
;
33
Jetscape::real
mu_B
;
34
Jetscape::real
mu_C
;
35
Jetscape::real
mu_S
;
36
Jetscape::real
vx
,
vy
,
vz
;
37
Jetscape::real
pi
[4][4];
38
Jetscape::real
bulk_Pi
;
39
41
FluidCellInfo
();
42
44
FluidCellInfo
inline
operator*=
(
Jetscape::real
b
);
45
47
//void Print();
48
};
49
50
//overload +-*/ for easier linear interpolation
52
inline
FluidCellInfo
operator+
(
FluidCellInfo
a
,
const
FluidCellInfo
&
b
) {
53
a.
energy_density
+= b.
energy_density
;
54
a.
entropy_density
+= b.
entropy_density
;
55
a.
temperature
+= b.
temperature
;
56
a.
pressure
+= b.
pressure
;
57
a.
qgp_fraction
+= b.
qgp_fraction
;
58
a.
mu_B
+= b.
mu_B
;
59
a.
mu_C
+= b.
mu_C
;
60
a.
mu_S
+= b.
mu_S
;
61
a.
vx
+= b.
vx
;
62
a.
vy
+= b.
vy
;
63
a.
vz
+= b.
vz
;
64
for
(
int
i
= 0;
i
< 4;
i
++) {
65
for
(
int
j
= 0;
j
< 4;
j
++) {
66
a.
pi
[
i
][
j
] += b.
pi
[
i
][
j
];
67
}
68
}
69
a.
bulk_Pi
+= b.
bulk_Pi
;
70
return
a
;
71
}
72
73
// Multiply the fluid cell with a scalar factor
74
FluidCellInfo
inline
FluidCellInfo::operator*=
(
Jetscape::real
b
) {
75
this->
energy_density
*=
b
;
76
this->
entropy_density
*=
b
;
77
this->
temperature
*=
b
;
78
this->
pressure
*=
b
;
79
this->
qgp_fraction
*=
b
;
80
this->
mu_B
*=
b
;
81
this->
mu_C
*=
b
;
82
this->
mu_S
*=
b
;
83
this->
vx
*=
b
;
84
this->
vy
*=
b
;
85
this->
vz
*=
b
;
86
for
(
int
i
= 0;
i
< 4;
i
++) {
87
for
(
int
j
= 0;
j
< 4;
j
++) {
88
this->
pi
[
i
][
j
] *=
b
;
89
}
90
}
91
this->
bulk_Pi
*=
b
;
92
return
*
this
;
93
}
94
96
inline
FluidCellInfo
operator*
(
Jetscape::real
a
,
FluidCellInfo
b
) {
97
b *=
a
;
98
return
b
;
99
}
100
102
inline
FluidCellInfo
operator*
(
FluidCellInfo
a
,
Jetscape::real
b
) {
103
a *=
b
;
104
return
a
;
105
}
106
108
inline
FluidCellInfo
operator/
(
FluidCellInfo
a
,
Jetscape::real
b
) {
109
a *= 1.0 /
b
;
110
return
a
;
111
}
112
113
// print the fluid cell information for debuging
114
// this function has bugs
115
//std::ostream &operator<<(std::ostream &os, const FluidCellInfo &cell) {
116
// os << "energy_density=" << cell.energy_density << std::endl;
117
// os << "entropy_density=" << cell.entropy_density << std::endl;
118
// os << "temperature=" << cell.temperature << std::endl;
119
// os << "pressure=" << cell.pressure << std::endl;
120
// os << "qgp_fraction=" << cell.qgp_fraction << std::endl;
121
// os << "mu_B=" << cell.mu_B << std::endl;
122
// os << "mu_C=" << cell.mu_C << std::endl;
123
// os << "mu_S=" << cell.mu_S << std::endl;
124
// os << "vx=" << cell.vx << std::endl;
125
// os << "vy=" << cell.vy << std::endl;
126
// os << "vz=" << cell.vz << std::endl;
127
// os << "pi[mu][nu]=" << std::endl;
128
// for (int i = 0; i < 4; i++) {
129
// for (int j = 0; j < 4; j++) {
130
// os << cell.pi[i][j] << ' ';
131
// }
132
// os << std::endl;
133
// }
134
// os << "bulk_Pi=" << cell.bulk_Pi;
135
// return os << std::endl;
136
//}
137
138
}
// end namespace Jetscape
139
140
#endif // FluidCellInfo
JETSCAPE
blob
main
src
framework
FluidCellInfo.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:24
using
1.8.2 with
sPHENIX GitHub integration