23 double e, nb, nq,
vx = 0.,
vy = 0.,
vz = 0.;
26 double avv_num = 0., avv_den = 0.;
29 for (
int ix = 0; ix < f->
getNX(); ix++)
30 for (
int iy = 0; iy < f->
getNY(); iy++)
31 for (
int iz = 0; iz < f->
getNZ(); iz++) {
33 double x = f->
getX(ix);
34 double y = f->
getY(iy);
37 const double _t = 1.0;
39 const double r = sqrt(x * x + y * y);
41 2. * q * q * _t * r / (1. + q * q * _t * _t + q * q * r *
r);
42 e = 4. * q * q / (1. + 2. * q * q * (_t * _t + r *
r) +
43 pow(q * q * (_t * _t - r * r), 2)) /
47 vx = x / (r + 1e-50) * _k;
48 vy = y / (r + 1e-50) * _k;
52 avv_num += sqrt(vx * vx +
vy *
vy) *
e;
56 double _p = eos->
p(e, nb, nq, 0.);
57 const double gamma2 = 1.0 / (1.0 - vx * vx - vy * vy -
vz *
vz);
59 ((e + _p) * gamma2 * (cosh(eta) +
vz * sinh(eta)) - _p * cosh(eta));
64 cout <<
"average initial flow = " << avv_num / avv_den << endl;
65 cout <<
"total energy = " << Etotal *f->
getDx() * f->
getDy() * f->
getDz() *