31 double *cmax,
Grid *grid)
46 static double *pL, *pR, *SL, *SR, *a2L, *a2R;
47 static double **fL, **fR;
49 double bmax, bmin, *vL, *vR, aL, aR;
73 Flux (state->
uL, state->
vL, a2L, fL, pL, beg, end);
74 Flux (state->
uR, state->
vR, a2R, fR, pR, beg, end);
77 for (i = beg; i <= end; i++) {
79 scrh =
MAX(fabs(SL[i]), fabs(SR[i]));
84 for (nv =
NFLX; nv--; ) state->
flux[i][nv] = fL[i][nv];
85 state->
press[i] = pL[i];
87 }
else if (SR[i] < 0.0){
89 for (nv =
NFLX; nv--; ) state->
flux[i][nv] = fR[i][nv];
90 state->
press[i] = pR[i];
97 scrh = 1.0 / (SR[
i] - SL[
i]);
98 for (nv =
NFLX; nv--; ) {
99 state->
flux[
i][nv] = SL[
i]*SR[
i]*(uR[nv] - uL[nv]) +
100 SR[i]*fL[i][nv] - SL[i]*fR[i][nv];
103 state->
press[
i] = (SR[
i]*pL[
i] - SL[
i]*pR[
i])*scrh;
double ** flux
upwind flux computed with the Riemann solver
void Flux(double **u, double **w, double *a2, double **fx, double *p, int beg, int end)
double ** vR
Primitive variables to the right of the interface, .
void SoundSpeed2(double **v, double *cs2, double *h, int beg, int end, int pos, Grid *grid)
void HLL_Solver(const State_1D *state, int beg, int end, double *cmax, Grid *grid)
double ** uR
same as vR, in conservative vars
#define ARRAY_1D(nx, type)
long int NMAX_POINT
Maximum number of points among the three directions, boundaries excluded.
void HLL_Speed(double **vL, double **vR, double *a2L, double *a2R, double *SL, double *SR, int beg, int end)
double ** vL
Primitive variables to the left of the interface, .
double * press
Upwind pressure term computed with the Riemann solver.
#define ARRAY_2D(nx, ny, type)
double ** uL
same as vL, in conservative vars