51 int ghosts = solver->
ghosts;
52 int ndims = solver->
ndims;
53 int nvars = solver->
nvars;
58 fprintf(stderr,
"Error in FirstDerivativeSecondOrder(): input arrays not allocated.\n");
64 int indexC[ndims], index_outer[ndims], bounds_outer[ndims];
68 #pragma omp parallel for schedule(auto) default(shared) private(i,j,v,index_outer,indexC) 69 for (j=0; j<N_outer; j++) {
73 for (i = -ghosts; i < -ghosts+1; i++) {
77 for (v=0; v<nvars; v++) Df[qC*nvars+v] = f[qR*nvars+v]-f[qC*nvars+v];
80 for (i = -ghosts+1; i < dim[dir]+ghosts-1; i++) {
85 for (v=0; v<nvars; v++) Df[qC*nvars+v] =
max(bias,0)*f[qR*nvars+v]-bias*f[qC*nvars+v]+
min(bias,0)*f[qL*nvars+v];
88 for (i = dim[dir]+ghosts-1; i < dim[dir]+ghosts; i++) {
92 for (v=0; v<nvars; v++) Df[qC*nvars+v] = f[qC*nvars+v]-f[qL*nvars+v];
MPI related function definitions.
Contains function definitions for common mathematical functions.
Some basic definitions and macros.
int FirstDerivativeFirstOrder(double *Df, double *f, int dir, int bias, void *s, void *m)
#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)
Structure of MPI-related variables.
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.
Definitions for the functions computing the first derivative.
#define _ArrayProduct1D_(x, size, p)