39 double *cmax,
Grid *grid)
51 static double **fL, **fR, **vRL;
52 static double *cRL_min, *cRL_max, *pL, *pR, *a2L, *a2R;
53 double *vR, *vL, *uR, *uL, *flux;
74 Flux (state->
uL, state->
vL, a2L, fL, pL, beg, end);
75 Flux (state->
uR, state->
vR, a2R, fR, pR, beg, end);
85 for (i = beg; i <= end; i++){
87 vRL[
i][
VXn] = 0.5*(fabs(state->
vL[i][
VXn]) + fabs(state->
vR[i][VXn]));
97 for (i = beg; i <= end; i++) {
100 flux = state->
flux[
i];
104 cmax[
i] =
MAX(fabs(cRL_max[i]), fabs(cRL_min[i]));
109 for (nv =
NFLX; nv--; ) {
110 flux[nv] = 0.5*(fL[
i][nv] + fR[
i][nv] - cmax[
i]*(uR[nv] - uL[nv]));
112 state->
press[
i] = 0.5*(pL[
i] + pR[
i]);
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)
void LF_Solver(const State_1D *state, int beg, int end, double *cmax, Grid *grid)
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)
double g_maxMach
The maximum Mach number computed during integration.
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.
double ** vL
Primitive variables to the left of the interface, .
double * press
Upwind pressure term computed with the Riemann solver.
void MaxSignalSpeed(double **v, double *cs2, double *cmin, double *cmax, int beg, int end)
#define ARRAY_2D(nx, ny, type)
double ** uL
same as vL, in conservative vars