20 #undef _MINIMUM_GHOSTS_
25 #define _MINIMUM_GHOSTS_ 1
93 int ghosts = solver->
ghosts;
94 int ndims = solver->
ndims;
95 int nvars = solver->
nvars;
100 int indexC[ndims], indexI[ndims], index_outer[ndims], bounds_outer[ndims], bounds_inter[ndims];
101 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
102 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
106 double R[nvars*nvars], L[nvars*nvars], uavg[nvars], fchar[nvars];
108 #pragma omp parallel for schedule(auto) default(shared) private(i,k,v,R,L,uavg,fchar,index_outer,indexC,indexI)
109 for (i=0; i<N_outer; i++) {
114 for (indexI[dir] = 0; indexI[dir] < dim[dir]+1; indexI[dir]++) {
117 indexC[dir] = indexI[dir]-1;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,pL);
118 indexC[dir] = indexI[dir] ;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,pR);
130 for (v = 0; v < nvars; v++) {
133 double fcL = 0, fcR = 0;
134 for (k = 0; k < nvars; k++) {
135 fcL += L[v*nvars+k] * fC[pL*nvars+k];
136 fcR += L[v*nvars+k] * fC[pR*nvars+k];
140 fchar[v] = (upw > 0 ? fcL : fcR);
Definitions for the functions computing the interpolated value of the primitive at the cell interface...
#define _ArrayIndexnD_(N, index, imax, i, ghost)
int(* GetRightEigenvectors)(double *, double *, void *, int)
MPI related function definitions.
#define _ArrayIndex1D_(N, imax, i, ghost, index)
int(* AveragingFunction)(double *, double *, double *, void *)
#define MatVecMult(N, y, A, x)
Contains function definitions for common mathematical functions.
int(* GetLeftEigenvectors)(double *, double *, void *, int)
#define _ArrayCopy1D_(x, y, size)
Contains structure definition for hypar.
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
#define _ArrayProduct1D_(x, size, p)
Structure containing all solver-specific variables and functions.
int Interp1PrimFirstOrderUpwindChar(double *, double *, double *, double *, int, int, void *, void *, int)
1st order upwind reconstruction (characteristic-based) on a uniform grid
Contains macros and function definitions for common matrix multiplication.