20 #undef _MINIMUM_GHOSTS_ 25 #define _MINIMUM_GHOSTS_ 1 95 int ghosts = solver->
ghosts;
96 int ndims = solver->
ndims;
97 int nvars = solver->
nvars;
102 int indexC[ndims], indexI[ndims], index_outer[ndims], bounds_outer[ndims], bounds_inter[ndims];
103 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
104 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
108 double R[nvars*nvars], L[nvars*nvars], uavg[nvars], fchar[nvars];
110 #pragma omp parallel for schedule(auto) default(shared) private(i,k,v,R,L,uavg,fchar,index_outer,indexC,indexI) 111 for (i=0; i<N_outer; i++) {
116 for (indexI[dir] = 0; indexI[dir] < dim[dir]+1; indexI[dir]++) {
119 indexC[dir] = indexI[dir]-1;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,pL);
120 indexC[dir] = indexI[dir] ;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,pR);
132 for (v = 0; v < nvars; v++) {
135 double fcL = 0, fcR = 0;
136 for (k = 0; k < nvars; k++) {
137 fcL += L[v*nvars+k] * fC[pL*nvars+k];
138 fcR += L[v*nvars+k] * fC[pR*nvars+k];
142 fchar[v] = 0.5 * (fcL + fcR);
MPI related function definitions.
Contains function definitions for common mathematical functions.
int(* AveragingFunction)(double *, double *, double *, void *)
Some basic definitions and macros.
#define _ArrayIndexnD_(N, index, imax, i, ghost)
Structure containing all solver-specific variables and functions.
Contains structure definition for hypar.
#define _ArrayIndex1D_(N, imax, i, ghost, index)
int Interp1PrimSecondOrderCentralChar(double *fI, double *fC, double *u, double *x, int upw, int dir, void *s, void *m, int uflag)
2nd order central reconstruction (characteristic-based) on a uniform grid
Contains macros and function definitions for common matrix multiplication.
Definitions for the functions computing the interpolated value of the primitive at the cell interface...
#define MatVecMult(N, y, A, x)
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.
int(* GetRightEigenvectors)(double *, double *, void *, int)
#define _ArrayProduct1D_(x, size, p)
int(* GetLeftEigenvectors)(double *, double *, void *, int)