32 int ndims = solver->
ndims;
34 int ghosts = solver->
ghosts;
36 int index_outer[ndims],
41 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
46 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
49 int indexL[ndims];
_ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
51 int idxL[ndims], idxR[ndims];
53 int neig = 2+4*(ndims-1);
58 for (
int tdir = 0; tdir < ndims; tdir++ ) {
71 fprintf(stderr,
"Error in VlasovUpwind(): count != neig for dir=%d\n",dir);
75 int all_positive = 1, all_negative = 1;
76 double maxabs_eig = 0.0;
77 for (
int n = 0; n<neig; n++) {
78 if (eig[n] <= 0) all_positive = 0;
79 if (eig[n] >= 0) all_negative = 0;
87 }
else if (all_negative) {
90 fI[p] = 0.5 * (fL[p] + fR[p] - maxabs_eig * (uR[p] - uL[p]));
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
int VlasovUpwind(double *, double *, double *, double *, double *, double *, int, void *, double)
double VlasovAdvectionCoeff(int *, int, void *)
#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.
Structure containing all solver-specific variables and functions.