15 #undef _MINIMUM_GHOSTS_ 19 #define _MINIMUM_GHOSTS_ 1 58 fprintf(stderr,
"Error in FirstDerivativeSecondOrder(): input arrays not allocated.\n");
62 fprintf(stderr,
"Error in FirstDerivativeSecondOrderCentralNoGhosts(): insufficient number of ghosts.\n");
68 int indexC[ndims], index_outer[ndims], bounds_outer[ndims];
72 #pragma omp parallel for schedule(auto) default(shared) private(i,j,v,index_outer,indexC) 73 for (j=0; j<N_outer; j++) {
76 for (i = 0; i < dim[dir]; i++) {
81 for (v=0; v<nvars; v++) Df[qC*nvars+v] = 0.5 * (f[qR*nvars+v]-f[qL*nvars+v]);
85 if (mpi->
ip[dir] == 0) {
87 #pragma omp parallel for schedule(auto) default(shared) private(i,j,v,index_outer,indexC) 88 for (j=0; j<N_outer; j++) {
96 for (v=0; v<nvars; v++) Df[qC*nvars+v] = (-0.5*f[qR2*nvars+v]+2*f[qR*nvars+v]-1.5*f[qC*nvars+v]);
100 if (mpi->
ip[dir] == (mpi->
iproc[dir]-1)) {
102 #pragma omp parallel for schedule(auto) default(shared) private(i,j,v,index_outer,indexC) 103 for (j=0; j<N_outer; j++) {
111 for (v=0; v<nvars; v++) Df[qC*nvars+v] = (0.5*f[qL2*nvars+v]-2*f[qL*nvars+v]+1.5*f[qC*nvars+v]);
MPI related function definitions.
Some basic definitions and macros.
#define _ArrayIndexnD_(N, index, imax, i, ghost)
#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)
int FirstDerivativeSecondOrderCentralNoGhosts(double *Df, double *f, int dir, int bias, int ndims, int *dim, int ghosts, int nvars, void *m)