38 int dim = boundary->
dim;
39 int face = boundary->
face;
41 double *xmin = boundary->
xmin;
42 double *xmax = boundary->
xmax;
46 int bounds[ndims], indexb[ndims];
51 int i = indexb[dim] + boundary->
is[dim];
52 double x, xstart, xend;
58 if (face > 0) sigma = (x - xstart) / (xend - xstart);
59 else sigma = (x - xend ) / (xstart - xend);
62 for (v=0; v<nvars; v++) source[nvars*p+v] -= (sigma * (u[nvars*p+v]-uref[v]));
Containts the structures and definitions for boundary condition implementation.
Some basic definitions and macros.
Structure containing the variables and function pointers defining a boundary.
#define _ArraySubtract1D_(x, a, b, size)
int BCSpongeUDummy(void *b, void *m, int ndims, int nvars, int *size, int ghosts, double *phi, double waqt)
#define _ArrayIndex1DWO_(N, imax, i, offset, ghost, index)
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
#define _GetCoordinate_(dir, i, dim, ghosts, x, coord)
int BCSpongeSource(void *b, int ndims, int nvars, int ghosts, int *size, double *grid, double *u, double *source)
Contains macros and function definitions for common array operations.