15 int(*)(
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double));
16 static int DefaultUpwinding (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
41 int(*FluxFunction)(
double*,
double*,
int,
void*,
double),
43 int(*UpwindFunction)(
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double)
49 double *FluxI = solver->
fluxI;
50 double *FluxC = solver->
fluxC;
53 int ndims = solver->
ndims;
54 int nvars = solver->
nvars;
55 int ghosts = solver->
ghosts;
58 double *x = solver->
x;
59 double *dxinv = solver->
dxinv;
60 int index[ndims], index1[ndims], index2[ndims], dim_interface[ndims];
66 if (!FluxFunction)
return(0);
70 double cpu_time = 0.0;
71 clock_t cpu_start, cpu_end;
75 for (d = 0; d < ndims; d++) {
77 int size_cellcenter = 1;
for (i = 0; i < ndims; i++) size_cellcenter *= (dim[i] + 2*ghosts);
78 int size_interface = 1;
for (i = 0; i < ndims; i++) size_interface *= dim_interface[i];
100 for (v=0; v<nvars; v++) hyp[nvars*p+v] += dxinv[offset+ghosts+index[d]]
101 * (FluxI[nvars*p2+v]-FluxI[nvars*p1+v]);
105 if (index[d] == dim[d]-1)
111 #if defined(CPU_STAT) 113 cpu_time += (double)(cpu_end - cpu_start) / CLOCKS_PER_SEC;
116 offset += dim[d] + 2*ghosts;
119 #if defined(CPU_STAT) 120 printf(
"HyperbolicFunction CPU time = %8.6lf\n", cpu_time);
183 int(*UpwindFunction)(
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double)
191 double *uL = solver->
uL;
192 double *uR = solver->
uR;
193 double *fluxL = solver->
fL;
194 double *fluxR = solver->
fR;
218 if (UpwindFunction) {
IERR UpwindFunction (fluxI,fluxL,fluxR,uL ,uR ,u ,dir,solver,t);
CHECKERR(ierr); }
242 int ndims = solver->
ndims;
243 int nvars = solver->
nvars;
245 int bounds_outer[ndims], bounds_inter[ndims];
246 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
247 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
249 done = 0;
int index_outer[ndims], index_inter[ndims];
253 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
255 int v;
for (v=0; v<nvars; v++) fI[nvars*p+v] = 0.5 * (fL[nvars*p+v]+fR[nvars*p+v]);
MPI related function definitions.
Some basic definitions and macros.
int HyperbolicFunction(double *hyp, double *u, void *s, void *m, double t, int LimFlag, int(*FluxFunction)(double *, double *, int, void *, double), int(*UpwindFunction)(double *, double *, double *, double *, double *, double *, int, void *, double))
int(* SetInterpLimiterVar)(double *, double *, double *, int, void *, void *)
static int DefaultUpwinding(double *, double *, double *, double *, double *, double *, int, void *, double)
Structure containing all solver-specific variables and functions.
Contains structure definition for hypar.
int(* InterpolateInterfacesHyp)(double *, double *, double *, double *, int, int, void *, void *, int)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
double * StageBoundaryIntegral
static int ReconstructHyperbolic(double *, double *, double *, double *, int, void *, void *, double, int, int(*)(double *, double *, double *, double *, double *, double *, int, void *, double))
Structure of MPI-related variables.
#define _ArrayBlockMultiply_(x, a, n, bs)
int npoints_local_wghosts
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.
int(* UFunction)(double *, double *, int, void *, void *, double)