53 int v, done, p, p1, p2, dir;
54 double *SourceI = solver->
fluxI;
55 double *SourceC = solver->
fluxC;
56 double *SourceL = solver->
fL;
57 double *SourceR = solver->
fR;
59 int ghosts = solver->
ghosts;
61 double *x = solver->
x;
62 double *dxinv = solver->
dxinv;
63 double RT = param->
p0 / param->
rho0;
71 if (grav[dir] != 0.0) {
73 _ArrayCopy1D_(dim,dim_interface,_MODEL_NDIMS_); dim_interface[dir]++;
90 double dx_inverse;
_GetCoordinate_(dir,index[dir],dim,ghosts,dxinv,dx_inverse);
95 source[_MODEL_NVARS_*p+v] += ( (term[v]*param->
grav_field_f[p])
96 * (SourceI[_MODEL_NVARS_*p2+v]-SourceI[_MODEL_NVARS_*p1+v])*dx_inverse );
137 int ghosts = solver->
ghosts;
139 static int index[_MODEL_NDIMS_], bounds[_MODEL_NDIMS_], offset[_MODEL_NDIMS_];
143 int i;
for (i=0; i<
_MODEL_NDIMS_; i++) bounds[i] += 2*ghosts;
191 _ArrayCopy1D_(dim,bounds_outer,_MODEL_NDIMS_); bounds_outer[dir] = 1;
192 _ArrayCopy1D_(dim,bounds_inter,_MODEL_NDIMS_); bounds_inter[dir] += 1;
197 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
198 int p;
_ArrayIndex1D_(_MODEL_NDIMS_,bounds_inter,index_inter,0,p);
200 (fI+_MODEL_NVARS_*p)[k] = 0.5 * ((fL+_MODEL_NVARS_*p)[k] + (fR+_MODEL_NVARS_*p)[k]);
#define _NavierStokes3DGetFlowVar_(u, stride, rho, vx, vy, vz, e, P, gamma)
#define _ArraySetValue_(x, size, value)
3D Navier Stokes equations (compressible flows)
#define _ArrayIncrementIndex_(N, imax, i, done)
int NavierStokes3DSource(double *, double *, void *, void *, double)
MPI related function definitions.
int NavierStokes3DSourceUpwind(double *, double *, double *, double *, int, void *, double)
#define _GetCoordinate_(dir, i, dim, ghosts, x, coord)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _ArrayIndex1DWO_(N, imax, i, offset, ghost, index)
#define _ArrayCopy1D_(x, y, size)
int(* InterpolateInterfacesHyp)(double *, double *, double *, double *, int, int, void *, void *, int)
int NavierStokes3DSourceFunction(double *, double *, double *, void *, void *, double, int)
Contains structure definition for hypar.
Structure containing variables and parameters specific to the 3D Navier Stokes equations. This structure contains the physical parameters, variables, and function pointers specific to the 3D Navier-Stokes equations.
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
Structure of MPI-related variables.
Structure containing all solver-specific variables and functions.
static const int _NavierStokes3D_stride_