37 size = backtrace(array, 10);
40 cout<<
"Error: signal "<<sig<<endl ;
41 backtrace_symbols_fd(array, size, 2);
48 ofile.open(filename) ;
49 cout.rdbuf(
ofile.rdbuf()) ;
50 cerr.rdbuf(
ofile.rdbuf()) ;
55 eos =
new EoSs(filename,*ncols) ;
61 eos =
new EoS3f(filename, *B, *volex0, *delta0, *aaa, *bbb) ;
66 eos =
new EoS1f(filename) ;
75 void eoshlle_(
double *
e,
double *nb,
double *nq,
double *
ns,
double *
T,
double *mub,
double *muq,
double *mus,
double *
p)
77 eos->
eos(*e, *nb, *nq, *ns, *T, *mub, *muq, *mus, *p) ;
81 void eosrangeshlle_(
double *emax,
double *e0,
double *nmax,
double *n0,
int *ne,
int *nn)
83 eos->eosranges(*emax, *e0, *nmax, *n0, *ne, *nn) ;
87 void initfluidhlle_(
int*
nx,
int*
ny,
int*
nz,
double* minx,
double* maxx,
double* miny,
double* maxy,
double* minz,
double* maxz)
89 f =
new Fluid(eos, trcoeff, *nx, *ny, *nz, *minx, *maxx, *miny, *maxy, *minz, *maxz) ;
96 ic_kw =
new IC_KW(filename) ;
101 void icgethlle3f_(
double*
x,
double*
y,
double*
eta,
double*
e,
double* nB,
double* nQ,
double* nS,
double*
vx,
double*
vy,
double*
vz)
104 ic_kw->getICs(*x, *y, *eta, *e, *vx, *vy, *vz, nu, nd, ns) ;
106 *nB = 1./3.*(nu + nd +
ns) ;
107 *nQ = 1./3.*(2.*nu - nd -
ns) ;
112 void icgethlle_(
double*
x,
double*
y,
double*
eta,
double*
e,
double* nB,
double* nQ,
double* nS,
double*
vx,
double*
vy,
double*
vz)
115 ic_kw->getICs(*x, *y, *eta, *e, *vx, *vy, *vz, nu, nd, ns) ;
116 *nB = *nQ = *nS = 0. ;
120 void icsethlle_(
int* ix,
int* iy,
int* iz,
double*
tau0,
double*
e,
double* nb,
double* nq,
double*
ns,
double*
vx,
double*
vy,
double*
vz)
123 if((*vx)*(*vx)+(*vy)*(*vy)+(*vz)*(*vz)>1.){
125 double factor = sqrt((*vx)*(*vx)+(*vy)*(*vy)+(*vz)*(*vz)) ;
126 (*vx) = (*vx)*0.99/factor ;
127 (*vy) = (*vy)*0.99/factor ;
128 (*vz) = (*vz)*0.99/factor ;
130 if(isinf(*e) || isnan(*e) || isinf(*nb) || isnan(*nb) || isinf(*nq) || isnan(*nq) || isinf(*ns) || isnan(*ns) ||
131 isinf(*vx) || isnan(*vx) || isinf(*vy) || isnan(*vy) || isinf(*vz) || isnan(*vz))
132 {cout<<
"fluid: bad init,"<<setw(14)<<
"e"<<setw(14)<<
"nb"<<setw(14)<<
"nq"<<setw(14)<<
"ns"<<setw(14)<<
"vx"<<setw(14)<<
"vy"<<setw(14)<<
"vz"<<endl ;
133 cout<<
"----------------"<<setw(14)<<e<<setw(14)<<nb<<setw(14)<<nq<<setw(14)<<ns<<setw(14)<<vx<<setw(14)<<vy<<setw(14)<<vz<<endl ;
134 cout<<
"cell "<<ix<<
" "<<iy<<
" "<<iz<<endl ;
136 c->
setPrimVar(eos, *tau0, *e, *nb, *nq, *ns, (*vx), (*vy), (*vz)) ;
165 f->outputPDirections(h->
getTau());
166 f->outputTransverseAverages(h->
getTau()) ;
179 f->outputPDirections(h->
getTau());
180 f->outputTransverseAverages(h->
getTau()) ;
184 void getvalueshlle_(
int* ix,
int* iy,
int* iz,
double*
e,
double *
p,
double *nb,
double *nq,
double *
ns,
double*
vx,
double*
vy,
double*
vz,
double* viscCorrCutFlag)
203 for(
int i=0;
i<4;
i++)
204 for(
int j=0;
j<4;
j++){
214 return f->
getX(*ix-1) ;
220 return f->
getY(*iy-1) ;
226 return f->
getZ(*iz-1) ;
257 double ene = 0.,
e,
p, nb, nq,
ns,
vx,
vy,
vz, _vx, _vy, _vz ;
259 for(
int ix=0; ix<f->
getNX(); ix++)
260 for(
int iy=0; iy<f->
getNY(); iy++)
261 for(
int iz=0; iz<f->
getNZ(); iz++){
262 f->
getCell(ix, iy, iz)->
getPrimVar(eos, tau,
e, p, nb, nq, ns, _vx, _vy, _vz) ;
264 vx = _vx/(cosh(eta) + _vz*sinh(eta)) ;
265 vy = _vy/(cosh(eta) + _vz*sinh(eta)) ;
266 vz = (_vz*cosh(eta)+sinh(eta))/(cosh(eta) + _vz*sinh(eta)) ;
267 ene += (
e+
p)/(1.-vx*vx-vy*vy-vz*vz) -
p ;