18 #undef _MINIMUM_GHOSTS_
23 #define _MINIMUM_GHOSTS_ 3
82 int ghosts = solver->
ghosts;
83 int ndims = solver->
ndims;
84 int nvars = solver->
nvars;
89 static const double one_by_thirty = 1.0/30.0,
90 thirteen_by_sixty = 13.0/60.0,
91 fortyseven_by_sixty = 47.0/60.0,
92 twentyseven_by_sixty = 27.0/60.0,
93 one_by_twenty = 1.0/20.0;
97 int indexC[ndims], indexI[ndims], index_outer[ndims], bounds_outer[ndims], bounds_inter[ndims];
99 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
103 #pragma omp parallel for schedule(auto) default(shared) private(i,index_outer,indexC,indexI)
104 for (i=0; i<N_outer; i++) {
108 for (indexI[dir] = 0; indexI[dir] < dim[dir]+1; indexI[dir]++) {
109 int qm1,qm2,qm3,qp1,qp2,p;
112 indexC[dir] = indexI[dir]-1;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qm1);
113 qm3 = qm1 - 2*stride[dir];
114 qm2 = qm1 - stride[dir];
115 qp1 = qm1 + stride[dir];
116 qp2 = qm1 + 2*stride[dir];
118 indexC[dir] = indexI[dir] ;
_ArrayIndex1D_(ndims,dim,indexC,ghosts,qm1);
119 qm3 = qm1 + 2*stride[dir];
120 qm2 = qm1 + stride[dir];
121 qp1 = qm1 - stride[dir];
122 qp2 = qm1 - 2*stride[dir];
126 double *fm3, *fm2, *fm1, *fp1, *fp2;
127 fm3 = (fC+qm3*nvars);
128 fm2 = (fC+qm2*nvars);
129 fm1 = (fC+qm1*nvars);
130 fp1 = (fC+qp1*nvars);
131 fp2 = (fC+qp2*nvars);
134 for (v=0; v<nvars; v++) {
135 (fI+p*nvars)[v] = one_by_thirty * fm3[v]
136 - thirteen_by_sixty * fm2[v]
137 + fortyseven_by_sixty * fm1[v]
138 + twentyseven_by_sixty * fp1[v]
139 - one_by_twenty * fp2[v];
Definitions for the functions computing the interpolated value of the primitive at the cell interface...
#define _ArrayIndexnD_(N, index, imax, i, ghost)
MPI related function definitions.
int Interp1PrimFifthOrderUpwind(double *, double *, double *, double *, int, int, void *, void *, int)
5th order upwind reconstruction (component-wise) on a uniform grid
#define _ArrayIndex1D_(N, imax, i, ghost, index)
Contains function definitions for common mathematical functions.
#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.