47 int ndims = solver->
ndims;
48 int ghosts= solver->
ghosts;
51 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
53 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
60 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
62 int indexL[ndims];
_ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
132 int ndims = solver->
ndims;
134 int ghosts = solver->
ghosts;
136 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
137 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
138 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
144 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
146 int indexL[ndims];
_ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
168 double eigL,eigC,eigR;
176 if ((eigL > 0) && (eigC > 0) && (eigR > 0)) fc[k] = fcL[k];
177 else if ((eigL < 0) && (eigC < 0) && (eigR < 0)) fc[k] = fcR[k];
180 fc[k] = 0.5 * (fcL[k] + fcR[k] + alpha * (ucL[k]-ucR[k]));
229 int ndims = solver->
ndims;
231 int ghosts = solver->
ghosts;
233 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
234 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
235 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
241 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
243 int indexL[ndims];
_ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
265 double eigL,eigC,eigR;
274 fc[k] = 0.5 * (fcL[k] + fcR[k] + alpha * (ucL[k]-ucR[k]));
310 int ndims = solver->
ndims;
313 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
314 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
315 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
321 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
323 double rho,v,e,P,c,gamma=param->
gamma,term,Mach;
328 Mach = v/sqrt(gamma*P/rho);
334 }
else if (Mach < 1.0) {
337 c = sqrt(gamma*P/rho);
338 term = rho/(2.0*gamma);
340 fp[0] = term * (2*gamma*v + c - v);
341 fp[1] = term * (2*(gamma-1.0)*v*v + (v+c)*(v+c));
342 fp[2] = term * ((gamma-1.0)*v*v*v + 0.5*(v+c)*(v+c)*(v+c) + ((3.0-gamma)*(v+c)*c*c)/(2.0*(gamma-1.0)));
345 c = sqrt(gamma*P/rho);
346 term = rho/(2.0*gamma);
348 fm[0] = term * (v - c);
349 fm[1] = term * (v-c) * (v-c);
350 fm[2] = term * (0.5*(v-c)*(v-c)*(v-c) + ((3.0-gamma)*(v-c)*c*c)/(2.0*(gamma-1.0)));
393 int ndims = solver->
ndims;
394 int ghosts= solver->
ghosts;
397 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
398 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
399 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
408 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
411 int indexL[ndims];
_ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
419 double rho, uvel, E, P, c;
422 c = param->
gamma*P/rho;
426 c = param->
gamma*P/rho;
430 c = param->
gamma*P/rho;
431 double alphaavg = c +
absolute(uvel);
434 double alpha = kappa*
max3(alphaL,alphaR,alphaavg);
470 int ndims = solver->
ndims;
471 int ghosts= solver->
ghosts;
475 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
476 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
477 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
484 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
486 int indexL[ndims];
_ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
551 int ndims = solver->
ndims;
553 int ghosts = solver->
ghosts;
556 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
557 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
558 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
564 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
566 int indexL[ndims];
_ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
588 double eigL,eigC,eigR;
596 if ((eigL > 0) && (eigC > 0) && (eigR > 0)) fc[k] = fcL[k];
597 else if ((eigL < 0) && (eigC < 0) && (eigR < 0)) fc[k] = fcR[k];
600 fc[k] = 0.5 * (fcL[k] + fcR[k] + alpha * (ucL[k]-ucR[k]));
640 int ndims = solver->
ndims;
642 int ghosts = solver->
ghosts;
645 int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
646 _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
647 _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
653 for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
655 int indexL[ndims];
_ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
677 double eigL,eigC,eigR;
686 fc[k] = 0.5 * (fcL[k] + fcR[k] + alpha * (ucL[k]-ucR[k]));
int Euler1DUpwindLLF(double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
Contains function definitions for common mathematical functions.
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
int Euler1DUpwinddFLLF(double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
int Euler1DUpwindRusanov(double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
int Euler1DUpwinddFRoe(double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
Some basic definitions and macros.
#define _Euler1DLeftEigenvectors_(u, L, p, dir)
Structure containing all solver-specific variables and functions.
#define _ArrayAdd1D_(x, a, b, size)
Contains structure definition for hypar.
#define _ArrayCopy1D3_(x, y, size)
#define MatVecMult3(N, y, A, x)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
int Euler1DUpwindRF(double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
#define _Euler1DEigenvalues_(u, D, p, dir)
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
int Euler1DUpwindSWFS(double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
#define _Euler1DRightEigenvectors_(u, R, p, dir)
1D Euler Equations (inviscid, compressible flows)
int Euler1DUpwindRoe(double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
Contains macros and function definitions for common matrix multiplication.
#define MatMult3(N, A, X, Y)
#define _Euler1DGetFlowVar_(u, rho, v, e, P, p)
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
int Euler1DUpwinddFRF(double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)