35 int dim = boundary->
dim;
36 int face = boundary->
face;
39 int bounds[ndims], indexb[ndims], indexi[ndims];
47 if (face == 1) indexi[dim] = ghosts-1-indexb[dim];
48 else if (face == -1) indexi[dim] = size[dim]-indexb[dim]-1;
54 phi[nvars*p1+0] = phi[nvars*p2+0];
55 phi[nvars*p1+1] = (dim ==
_XDIR_ ? -phi[nvars*p2+1] : phi[nvars*p2+1] );
56 phi[nvars*p1+2] = (dim ==
_YDIR_ ? -phi[nvars*p2+2] : phi[nvars*p2+2] );
57 phi[nvars*p1+3] = phi[nvars*p2+3];
58 }
else if (nvars == 5) {
59 phi[nvars*p1+0] = phi[nvars*p2+0];
60 phi[nvars*p1+1] = (dim ==
_XDIR_ ? -phi[nvars*p2+1] : phi[nvars*p2+1] );
61 phi[nvars*p1+2] = (dim ==
_YDIR_ ? -phi[nvars*p2+2] : phi[nvars*p2+2] );
62 phi[nvars*p1+3] = (dim ==
_ZDIR_ ? -phi[nvars*p2+3] : phi[nvars*p2+3] );
63 phi[nvars*p1+4] = phi[nvars*p2+4];
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 BCNoFluxU(void *b, void *m, int ndims, int nvars, int *size, int ghosts, double *phi, double waqt)
#define _ArrayAdd1D_(x, a, b, size)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _ArrayIndex1DWO_(N, imax, i, offset, ghost, index)
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.