15 #undef _MINIMUM_GHOSTS_ 19 #define _MINIMUM_GHOSTS_ 1 54 fprintf(stderr,
"Error in SecondDerivativeSecondOrder(): input arrays not allocated.\n");
58 fprintf(stderr,
"Error in SecondDerivativeSecondOrderNoGhosts(): insufficient number of ghosts.\n");
64 int indexC[ndims], index_outer[ndims], bounds_outer[ndims];
70 for (i = 0; i < dim[dir]; i++) {
75 for (v=0; v<nvars; v++) D2f[qC*nvars+v] = f[qL*nvars+v]-2*f[qC*nvars+v]+f[qR*nvars+v];
80 if (mpi->
ip[dir] == 0) {
91 for (v=0; v<nvars; v++) D2f[qC*nvars+v] = 2*f[qC*nvars+v]-5*f[qR*nvars+v]+4*f[qR2*nvars+v]-f[qR3*nvars+v];
96 if (mpi->
ip[dir] == (mpi->
iproc[dir]-1)) {
102 int qL3, qL2, qL, qC;
107 for (v=0; v<nvars; v++) D2f[qC*nvars+v] = 2*f[qC*nvars+v]-5*f[qL*nvars+v]+4*f[qL2*nvars+v]-f[qL3*nvars+v];
MPI related function definitions.
Some basic definitions and macros.
int SecondDerivativeSecondOrderCentralNoGhosts(double *D2f, double *f, int dir, int ndims, int *dim, int ghosts, int nvars, void *m)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
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 second derivative.