19 #undef _MINIMUM_GHOSTS_
24 #define _MINIMUM_GHOSTS_ 3
100 int ghosts = solver->
ghosts;
101 int ndims = solver->
ndims;
102 int nvars = solver->
nvars;
106 static const double one_by_thirty = 1.0/30.0,
107 thirteen_by_sixty = 13.0/60.0,
108 fortyseven_by_sixty = 47.0/60.0,
109 twentyseven_by_sixty = 27.0/60.0,
110 one_by_twenty = 1.0/20.0;
114 int indexC[ndims], indexI[ndims], index_outer[ndims], bounds_outer[ndims], bounds_inter[ndims];
115 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
116 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
120 double R[nvars*nvars], L[nvars*nvars], uavg[nvars], fchar[nvars];
122 #pragma omp parallel for schedule(auto) default(shared) private(i,k,v,R,L,uavg,fchar,index_outer,indexC,indexI)
123 for (i=0; i<N_outer; i++) {
128 for (indexI[dir] = 0; indexI[dir] < dim[dir]+1; indexI[dir]++) {
131 int qm1,qm2,qm3,qp1,qp2;
133 indexC[dir] = indexI[dir]-3;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qm3);
134 indexC[dir] = indexI[dir]-2;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qm2);
135 indexC[dir] = indexI[dir]-1;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qm1);
136 indexC[dir] = indexI[dir] ;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qp1);
137 indexC[dir] = indexI[dir]+1;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qp2);
139 indexC[dir] = indexI[dir]+2;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qm3);
140 indexC[dir] = indexI[dir]+1;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qm2);
141 indexC[dir] = indexI[dir] ;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qm1);
142 indexC[dir] = indexI[dir]-1;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qp1);
143 indexC[dir] = indexI[dir]-2;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qp2);
157 for (v = 0; v < nvars; v++) {
160 double fm3, fm2, fm1, fp1, fp2;
161 fm3 = fm2 = fm1 = fp1 = fp2 = 0;
162 for (k = 0; k < nvars; k++) {
163 fm3 += L[v*nvars+k] * fC[qm3*nvars+k];
164 fm2 += L[v*nvars+k] * fC[qm2*nvars+k];
165 fm1 += L[v*nvars+k] * fC[qm1*nvars+k];
166 fp1 += L[v*nvars+k] * fC[qp1*nvars+k];
167 fp2 += L[v*nvars+k] * fC[qp2*nvars+k];
171 fchar[v] = one_by_thirty * fm3
172 - thirteen_by_sixty * fm2
173 + fortyseven_by_sixty * fm1
174 + twentyseven_by_sixty * fp1
175 - one_by_twenty * fp2;
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.
Contains macros and function definitions for common matrix multiplication.
int Interp1PrimFifthOrderUpwindChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order upwind reconstruction (characteristic-based) on a uniform grid