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]);
Definitions for the functions computing the first derivative.
#define _ArrayIndexnD_(N, index, imax, i, ghost)
MPI related function definitions.
#define _ArrayIndex1D_(N, imax, i, ghost, index)
int FirstDerivativeSecondOrderCentralNoGhosts(double *, double *, int, int, int, int *, int, int, void *)
#define _ArrayCopy1D_(x, y, size)
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
#define _ArrayProduct1D_(x, size, p)
Structure of MPI-related variables.