HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
Euler1DUpwind.c File Reference

Contains functions to compute the upwind flux at grid interfaces for the 1D Euler equations. More...

#include <stdlib.h>
#include <math.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <mathfunctions.h>
#include <matmult_native.h>
#include <physicalmodels/euler1d.h>
#include <hypar.h>

Go to the source code of this file.

Functions

int Euler1DUpwindRoe (double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
 
int Euler1DUpwindRF (double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
 
int Euler1DUpwindLLF (double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
 
int Euler1DUpwindSWFS (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)
 
int Euler1DUpwinddFRF (double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
 
int Euler1DUpwinddFLLF (double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t)
 

Detailed Description

Contains functions to compute the upwind flux at grid interfaces for the 1D Euler equations.

Author
Debojyoti Ghosh

Definition in file Euler1DUpwind.c.

Function Documentation

◆ Euler1DUpwindRoe()

int Euler1DUpwindRoe ( double *  fI,
double *  fL,
double *  fR,
double *  uL,
double *  uR,
double *  u,
int  dir,
void *  s,
double  t 
)

Roe's upwinding scheme.

\begin{equation} {\bf f}_{j+1/2} = \frac{1}{2}\left[ {\bf f}_{j+1/2}^L + {\bf f}_{j+1/2}^R - \left| A\left({\bf u}_{j+1/2}^L,{\bf u}_{j+1/2}^R\right) \right| \left( {\bf u}_{j+1/2}^R - {\bf u}_{j+1/2}^L \right)\right] \end{equation}

This upwinding scheme is modified for the balanced discretization of the 1D Euler equations when there is a non-zero gravitational force. See the reference below. For flows without any gravitational forces, it reduces to its original form.

Parameters
fIComputed upwind interface flux
fLLeft-biased reconstructed interface flux
fRRight-biased reconstructed interface flux
uLLeft-biased reconstructed interface solution
uRRight-biased reconstructed interface solution
uCell-centered solution
dirSpatial dimension (unused since this is a 1D system)
sSolver object of type HyPar
tCurrent solution time

Definition at line 30 of file Euler1DUpwind.c.

41 {
42  HyPar *solver = (HyPar*) s;
43  Euler1D *param = (Euler1D*) solver->physics;
44  int done,k;
46 
47  int ndims = solver->ndims;
48  int ghosts= solver->ghosts;
49  int *dim = solver->dim_local;
50 
51  int index_outer[ndims], index_inter[ndims], bounds_outer[ndims], bounds_inter[ndims];
52  _ArrayCopy1D_(dim,bounds_outer,ndims); bounds_outer[dir] = 1;
53  _ArrayCopy1D_(dim,bounds_inter,ndims); bounds_inter[dir] += 1;
56 
57  done = 0; _ArraySetValue_(index_outer,ndims,0);
58  while (!done) {
59  _ArrayCopy1D_(index_outer,index_inter,ndims);
60  for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
61  int p; _ArrayIndex1D_(ndims,bounds_inter,index_inter,0,p);
62  int indexL[ndims]; _ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
63  int indexR[ndims]; _ArrayCopy1D_(index_inter,indexR,ndims);
64  int pL; _ArrayIndex1D_(ndims,dim,indexL,ghosts,pL);
65  int pR; _ArrayIndex1D_(ndims,dim,indexR,ghosts,pR);
66  double udiff[_MODEL_NVARS_], uavg[_MODEL_NVARS_],udiss[_MODEL_NVARS_];
67 
68  /* Roe's upwinding scheme */
69 
70  udiff[0] = 0.5 * (uR[_MODEL_NVARS_*p+0] - uL[_MODEL_NVARS_*p+0]);
71  udiff[1] = 0.5 * (uR[_MODEL_NVARS_*p+1] - uL[_MODEL_NVARS_*p+1]);
72  udiff[2] = 0.5 * (uR[_MODEL_NVARS_*p+2] - uL[_MODEL_NVARS_*p+2]);
73 
74  _Euler1DRoeAverage_ (uavg,(u+_MODEL_NVARS_*pL),(u+_MODEL_NVARS_*pR),param);
75  _Euler1DEigenvalues_ (uavg,D,param,0);
76  _Euler1DLeftEigenvectors_ (uavg,L,param,0);
77  _Euler1DRightEigenvectors_ (uavg,R,param,0);
78 
79  double kappa = max(param->grav_field[pL],param->grav_field[pR]);
80  k = 0; D[k] = kappa*absolute(D[k]);
81  k = 4; D[k] = kappa*absolute(D[k]);
82  k = 8; D[k] = kappa*absolute(D[k]);
83 
84  MatMult3(3,DL,D,L);
85  MatMult3(3,modA,R,DL);
86 
87  udiss[0] = modA[0*_MODEL_NVARS_+0]*udiff[0] + modA[0*_MODEL_NVARS_+1]*udiff[1] + modA[0*_MODEL_NVARS_+2]*udiff[2];
88  udiss[1] = modA[1*_MODEL_NVARS_+0]*udiff[0] + modA[1*_MODEL_NVARS_+1]*udiff[1] + modA[1*_MODEL_NVARS_+2]*udiff[2];
89  udiss[2] = modA[2*_MODEL_NVARS_+0]*udiff[0] + modA[2*_MODEL_NVARS_+1]*udiff[1] + modA[2*_MODEL_NVARS_+2]*udiff[2];
90 
91  fI[_MODEL_NVARS_*p+0] = 0.5 * (fL[_MODEL_NVARS_*p+0]+fR[_MODEL_NVARS_*p+0]) - udiss[0];
92  fI[_MODEL_NVARS_*p+1] = 0.5 * (fL[_MODEL_NVARS_*p+1]+fR[_MODEL_NVARS_*p+1]) - udiss[1];
93  fI[_MODEL_NVARS_*p+2] = 0.5 * (fL[_MODEL_NVARS_*p+2]+fR[_MODEL_NVARS_*p+2]) - udiss[2];
94  }
95  _ArrayIncrementIndex_(ndims,bounds_outer,index_outer,done);
96  }
97 
98  return(0);
99 }
#define absolute(a)
Definition: math_ops.h:32
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
Definition: euler1d.h:273
int ndims
Definition: hypar.h:26
#define _Euler1DLeftEigenvectors_(u, L, p, dir)
Definition: euler1d.h:225
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _Euler1DEigenvalues_(u, D, p, dir)
Definition: euler1d.h:207
#define _ArraySetValue_(x, size, value)
int * dim_local
Definition: hypar.h:37
#define _ArrayIncrementIndex_(N, imax, i, done)
void * physics
Definition: hypar.h:266
#define _Euler1DRightEigenvectors_(u, R, p, dir)
Definition: euler1d.h:249
int ghosts
Definition: hypar.h:52
#define MatMult3(N, A, X, Y)
#define _MODEL_NVARS_
Definition: euler1d.h:58
#define _DECLARE_IERR_
Definition: basic.h:17
#define _ArrayCopy1D_(x, y, size)
#define max(a, b)
Definition: math_ops.h:18
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
Definition: euler1d.h:169
double * grav_field
Definition: euler1d.h:288

◆ Euler1DUpwindRF()

int Euler1DUpwindRF ( double *  fI,
double *  fL,
double *  fR,
double *  uL,
double *  uR,
double *  u,
int  dir,
void *  s,
double  t 
)

Characteristic-based Roe-fixed upwinding scheme.

\begin{align} \alpha_{j+1/2}^{k,L} &= \sum_{k=1}^3 {\bf l}_{j+1/2}^k \cdot {\bf f}_{j+1/2}^{k,L}, \\ \alpha_{j+1/2}^{k,R} &= \sum_{k=1}^3 {\bf l}_{j+1/2}^k \cdot {\bf f}_{j+1/2}^{k,R}, \\ v_{j+1/2}^{k,L} &= \sum_{k=1}^3 {\bf l}_{j+1/2}^k \cdot {\bf u}_{j+1/2}^{k,L}, \\ v_{j+1/2}^{k,R} &= \sum_{k=1}^3 {\bf l}_{j+1/2}^k \cdot {\bf u}_{j+1/2}^{k,R}, \\ \alpha_{j+1/2}^k &= \left\{ \begin{array}{cc} \alpha_{j+1/2}^{k,L} & {\rm if}\ \lambda_{j,j+1/2,j+1} > 0 \\ \alpha_{j+1/2}^{k,R} & {\rm if}\ \lambda_{j,j+1/2,j+1} < 0 \\ \frac{1}{2}\left[ \alpha_{j+1/2}^{k,L} + \alpha_{j+1/2}^{k,R} - \left(\max_{\left[j,j+1\right]} \lambda\right) \left( v_{j+1/2}^{k,R} - v_{j+1/2}^{k,L} \right) \right] & {\rm otherwise} \end{array}\right., \\ {\bf f}_{j+1/2} &= \sum_{k=1}^3 \alpha_{j+1/2}^k {\bf r}_{j+1/2}^k \end{align}

where \({\bf l}\), \({\bf r}\), and \(\lambda\) are the left-eigenvectors, right-eigenvectors and eigenvalues. The subscripts denote the grid locations.

Note that this upwinding scheme cannot be used for solving flows with non-zero gravitational forces.

Parameters
fIComputed upwind interface flux
fLLeft-biased reconstructed interface flux
fRRight-biased reconstructed interface flux
uLLeft-biased reconstructed interface solution
uRRight-biased reconstructed interface solution
uCell-centered solution
dirSpatial dimension (unused since this is a 1D system)
sSolver object of type HyPar
tCurrent solution time

Definition at line 115 of file Euler1DUpwind.c.

126 {
127  HyPar *solver = (HyPar*) s;
128  Euler1D *param = (Euler1D*) solver->physics;
129  int done,k;
131 
132  int ndims = solver->ndims;
133  int *dim = solver->dim_local;
134  int ghosts = solver->ghosts;
135 
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;
140 
141  done = 0; _ArraySetValue_(index_outer,ndims,0);
142  while (!done) {
143  _ArrayCopy1D_(index_outer,index_inter,ndims);
144  for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
145  int p; _ArrayIndex1D_(ndims,bounds_inter,index_inter,0,p);
146  int indexL[ndims]; _ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
147  int indexR[ndims]; _ArrayCopy1D_(index_inter,indexR,ndims);
148  int pL; _ArrayIndex1D_(ndims,dim,indexL,ghosts,pL);
149  int pR; _ArrayIndex1D_(ndims,dim,indexR,ghosts,pR);
150  double uavg[_MODEL_NVARS_], fcL[_MODEL_NVARS_], fcR[_MODEL_NVARS_],
151  ucL[_MODEL_NVARS_], ucR[_MODEL_NVARS_], fc[_MODEL_NVARS_];
152  double kappa = max(param->grav_field[pL],param->grav_field[pR]);
153 
154  /* Roe-Fixed upwinding scheme */
155 
156  _Euler1DRoeAverage_ (uavg,(u+_MODEL_NVARS_*pL),(u+_MODEL_NVARS_*pR),param);
157  _Euler1DEigenvalues_ (uavg,D,param,0);
158  _Euler1DLeftEigenvectors_ (uavg,L,param,0);
159  _Euler1DRightEigenvectors_(uavg,R,param,0);
160 
161  /* calculate characteristic fluxes and variables */
166 
167  for (k = 0; k < _MODEL_NVARS_; k++) {
168  double eigL,eigC,eigR;
169  _Euler1DEigenvalues_((u+_MODEL_NVARS_*pL),D,param,0);
170  eigL = D[k*_MODEL_NVARS_+k];
171  _Euler1DEigenvalues_((u+_MODEL_NVARS_*pR),D,param,0);
172  eigR = D[k*_MODEL_NVARS_+k];
173  _Euler1DEigenvalues_(uavg,D,param,0);
174  eigC = D[k*_MODEL_NVARS_+k];
175 
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];
178  else {
179  double alpha = kappa * max3(absolute(eigL),absolute(eigC),absolute(eigR));
180  fc[k] = 0.5 * (fcL[k] + fcR[k] + alpha * (ucL[k]-ucR[k]));
181  }
182 
183  }
184 
185  /* calculate the interface flux from the characteristic flux */
187  }
188  _ArrayIncrementIndex_(ndims,bounds_outer,index_outer,done);
189  }
190 
191  return(0);
192 }
#define max3(a, b, c)
Definition: math_ops.h:27
#define absolute(a)
Definition: math_ops.h:32
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
Definition: euler1d.h:273
int ndims
Definition: hypar.h:26
#define _Euler1DLeftEigenvectors_(u, L, p, dir)
Definition: euler1d.h:225
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define MatVecMult3(N, y, A, x)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _Euler1DEigenvalues_(u, D, p, dir)
Definition: euler1d.h:207
#define _ArraySetValue_(x, size, value)
int * dim_local
Definition: hypar.h:37
#define _ArrayIncrementIndex_(N, imax, i, done)
void * physics
Definition: hypar.h:266
#define _Euler1DRightEigenvectors_(u, R, p, dir)
Definition: euler1d.h:249
int ghosts
Definition: hypar.h:52
#define _MODEL_NVARS_
Definition: euler1d.h:58
#define _DECLARE_IERR_
Definition: basic.h:17
#define _ArrayCopy1D_(x, y, size)
#define max(a, b)
Definition: math_ops.h:18
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
Definition: euler1d.h:169
double * grav_field
Definition: euler1d.h:288

◆ Euler1DUpwindLLF()

int Euler1DUpwindLLF ( double *  fI,
double *  fL,
double *  fR,
double *  uL,
double *  uR,
double *  u,
int  dir,
void *  s,
double  t 
)

Characteristic-based local Lax-Friedrich upwinding scheme.

\begin{align} \alpha_{j+1/2}^{k,L} &= \sum_{k=1}^3 {\bf l}_{j+1/2}^k \cdot {\bf f}_{j+1/2}^{k,L}, \\ \alpha_{j+1/2}^{k,R} &= \sum_{k=1}^3 {\bf l}_{j+1/2}^k \cdot {\bf f}_{j+1/2}^{k,R}, \\ v_{j+1/2}^{k,L} &= \sum_{k=1}^3 {\bf l}_{j+1/2}^k \cdot {\bf u}_{j+1/2}^{k,L}, \\ v_{j+1/2}^{k,R} &= \sum_{k=1}^3 {\bf l}_{j+1/2}^k \cdot {\bf u}_{j+1/2}^{k,R}, \\ \alpha_{j+1/2}^k &= \frac{1}{2}\left[ \alpha_{j+1/2}^{k,L} + \alpha_{j+1/2}^{k,R} - \left(\max_{\left[j,j+1\right]} \lambda\right) \left( v_{j+1/2}^{k,R} - v_{j+1/2}^{k,L} \right) \right], \\ {\bf f}_{j+1/2} &= \sum_{k=1}^3 \alpha_{j+1/2}^k {\bf r}_{j+1/2}^k \end{align}

where \({\bf l}\), \({\bf r}\), and \(\lambda\) are the left-eigenvectors, right-eigenvectors and eigenvalues. The subscripts denote the grid locations.

This upwinding scheme is modified for the balanced discretization of the 1D Euler equations when there is a non-zero gravitational force. See the reference below. For flows without any gravitational forces, it reduces to its original form.

Parameters
fIComputed upwind interface flux
fLLeft-biased reconstructed interface flux
fRRight-biased reconstructed interface flux
uLLeft-biased reconstructed interface solution
uRRight-biased reconstructed interface solution
uCell-centered solution
dirSpatial dimension (unused since this is a 1D system)
sSolver object of type HyPar
tCurrent solution time

Definition at line 212 of file Euler1DUpwind.c.

223 {
224  HyPar *solver = (HyPar*) s;
225  Euler1D *param = (Euler1D*) solver->physics;
226  int done,k;
228 
229  int ndims = solver->ndims;
230  int *dim = solver->dim_local;
231  int ghosts = solver->ghosts;
232 
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;
237 
238  done = 0; _ArraySetValue_(index_outer,ndims,0);
239  while (!done) {
240  _ArrayCopy1D_(index_outer,index_inter,ndims);
241  for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
242  int p; _ArrayIndex1D_(ndims,bounds_inter,index_inter,0,p);
243  int indexL[ndims]; _ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
244  int indexR[ndims]; _ArrayCopy1D_(index_inter,indexR,ndims);
245  int pL; _ArrayIndex1D_(ndims,dim,indexL,ghosts,pL);
246  int pR; _ArrayIndex1D_(ndims,dim,indexR,ghosts,pR);
247  double uavg[_MODEL_NVARS_], fcL[_MODEL_NVARS_], fcR[_MODEL_NVARS_],
248  ucL[_MODEL_NVARS_], ucR[_MODEL_NVARS_], fc[_MODEL_NVARS_];
249  double kappa = max(param->grav_field[pL],param->grav_field[pR]);
250 
251  /* Local Lax-Friedrich upwinding scheme */
252 
253  _Euler1DRoeAverage_ (uavg,(u+_MODEL_NVARS_*pL),(u+_MODEL_NVARS_*pR),param);
254  _Euler1DEigenvalues_ (uavg,D,param,0);
255  _Euler1DLeftEigenvectors_ (uavg,L,param,0);
256  _Euler1DRightEigenvectors_(uavg,R,param,0);
257 
258  /* calculate characteristic fluxes and variables */
263 
264  for (k = 0; k < _MODEL_NVARS_; k++) {
265  double eigL,eigC,eigR;
266  _Euler1DEigenvalues_((u+_MODEL_NVARS_*pL),D,param,0);
267  eigL = D[k*_MODEL_NVARS_+k];
268  _Euler1DEigenvalues_((u+_MODEL_NVARS_*pR),D,param,0);
269  eigR = D[k*_MODEL_NVARS_+k];
270  _Euler1DEigenvalues_(uavg,D,param,0);
271  eigC = D[k*_MODEL_NVARS_+k];
272 
273  double alpha = kappa * max3(absolute(eigL),absolute(eigC),absolute(eigR));
274  fc[k] = 0.5 * (fcL[k] + fcR[k] + alpha * (ucL[k]-ucR[k]));
275  }
276 
277  /* calculate the interface flux from the characteristic flux */
279  }
280  _ArrayIncrementIndex_(ndims,bounds_outer,index_outer,done);
281  }
282 
283  return(0);
284 }
#define max3(a, b, c)
Definition: math_ops.h:27
#define absolute(a)
Definition: math_ops.h:32
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
Definition: euler1d.h:273
int ndims
Definition: hypar.h:26
#define _Euler1DLeftEigenvectors_(u, L, p, dir)
Definition: euler1d.h:225
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define MatVecMult3(N, y, A, x)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _Euler1DEigenvalues_(u, D, p, dir)
Definition: euler1d.h:207
#define _ArraySetValue_(x, size, value)
int * dim_local
Definition: hypar.h:37
#define _ArrayIncrementIndex_(N, imax, i, done)
void * physics
Definition: hypar.h:266
#define _Euler1DRightEigenvectors_(u, R, p, dir)
Definition: euler1d.h:249
int ghosts
Definition: hypar.h:52
#define _MODEL_NVARS_
Definition: euler1d.h:58
#define _DECLARE_IERR_
Definition: basic.h:17
#define _ArrayCopy1D_(x, y, size)
#define max(a, b)
Definition: math_ops.h:18
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
Definition: euler1d.h:169
double * grav_field
Definition: euler1d.h:288

◆ Euler1DUpwindSWFS()

int Euler1DUpwindSWFS ( double *  fI,
double *  fL,
double *  fR,
double *  uL,
double *  uR,
double *  u,
int  dir,
void *  s,
double  t 
)

Steger-Warming Flux-Splitting scheme

  • Steger, J.L., Warming, R.F., "Flux vector splitting of the inviscid gasdynamic equations with application to finite-difference methods", J. Comput. Phys., 40(2), 1981, pp. 263-293, http://dx.doi.org/10.1016/0021-9991(81)90210-2.

Note that this method cannot be used for flows with non-zero gravitational forces.

Parameters
fIComputed upwind interface flux
fLLeft-biased reconstructed interface flux
fRRight-biased reconstructed interface flux
uLLeft-biased reconstructed interface solution
uRRight-biased reconstructed interface solution
uCell-centered solution
dirSpatial dimension (unused since this is a 1D system)
sSolver object of type HyPar
tCurrent solution time

Definition at line 293 of file Euler1DUpwind.c.

304 {
305  HyPar *solver = (HyPar*) s;
306  Euler1D *param = (Euler1D*) solver->physics;
307  int done;
309 
310  int ndims = solver->ndims;
311  int *dim = solver->dim_local;
312 
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;
316  static double fp[_MODEL_NVARS_], fm[_MODEL_NVARS_],uavg[_MODEL_NVARS_];
317 
318  done = 0; _ArraySetValue_(index_outer,ndims,0);
319  while (!done) {
320  _ArrayCopy1D_(index_outer,index_inter,ndims);
321  for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
322  int p; _ArrayIndex1D_(ndims,bounds_inter,index_inter,0,p);
323  double rho,v,e,P,c,gamma=param->gamma,term,Mach;
324 
325  /* Steger Warming flux splitting */
326  _Euler1DRoeAverage_(uavg,(uL+_MODEL_NVARS_*p),(uR+_MODEL_NVARS_*p),param);
327  _Euler1DGetFlowVar_(uavg,rho,v,e,P,param);
328  Mach = v/sqrt(gamma*P/rho);
329 
330  if (Mach < -1.0) {
331 
333 
334  } else if (Mach < 1.0) {
335 
336  _Euler1DGetFlowVar_((uL+_MODEL_NVARS_*p),rho,v,e,P,param);
337  c = sqrt(gamma*P/rho);
338  term = rho/(2.0*gamma);
339 
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)));
343 
344  _Euler1DGetFlowVar_((uR+_MODEL_NVARS_*p),rho,v,e,P,param);
345  c = sqrt(gamma*P/rho);
346  term = rho/(2.0*gamma);
347 
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)));
351 
353 
354  } else {
355 
357 
358  }
359 
360  }
361  _ArrayIncrementIndex_(ndims,bounds_outer,index_outer,done);
362  }
363 
364  return(0);
365 }
double gamma
Definition: euler1d.h:274
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
Definition: euler1d.h:273
int ndims
Definition: hypar.h:26
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define _ArrayAdd1D_(x, a, b, size)
#define _ArrayCopy1D3_(x, y, size)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _ArraySetValue_(x, size, value)
int * dim_local
Definition: hypar.h:37
#define _ArrayIncrementIndex_(N, imax, i, done)
void * physics
Definition: hypar.h:266
#define _MODEL_NVARS_
Definition: euler1d.h:58
#define _Euler1DGetFlowVar_(u, rho, v, e, P, p)
Definition: euler1d.h:81
#define _DECLARE_IERR_
Definition: basic.h:17
#define _ArrayCopy1D_(x, y, size)
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
Definition: euler1d.h:169

◆ Euler1DUpwindRusanov()

int Euler1DUpwindRusanov ( double *  fI,
double *  fL,
double *  fR,
double *  uL,
double *  uR,
double *  u,
int  dir,
void *  s,
double  t 
)

Rusanov's upwinding scheme.

\begin{equation} {\bf f}_{j+1/2} = \frac{1}{2}\left[ {\bf f}_{j+1/2}^L + {\bf f}_{j+1/2}^R - \max_{j,j+1} \nu_j \left( {\bf u}_{j+1/2}^R - {\bf u}_{j+1/2}^L \right)\right] \end{equation}

where \(\nu = c + \left|u\right|\).

  • Rusanov, V. V., "The calculation of the interaction of non-stationary shock waves and obstacles," USSR Computational Mathematics and Mathematical Physics, Vol. 1, No. 2, 1962, pp. 304–320
Parameters
fIComputed upwind interface flux
fLLeft-biased reconstructed interface flux
fRRight-biased reconstructed interface flux
uLLeft-biased reconstructed interface solution
uRRight-biased reconstructed interface solution
uCell-centered solution
dirSpatial dimension (unused since this is a 1D system)
sSolver object of type HyPar
tCurrent solution time

Definition at line 376 of file Euler1DUpwind.c.

387 {
388  HyPar *solver = (HyPar*) s;
389  Euler1D *param = (Euler1D*) solver->physics;
390  int done,k;
392 
393  int ndims = solver->ndims;
394  int ghosts= solver->ghosts;
395  int *dim = solver->dim_local;
396 
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;
400 
401  static double udiff[_MODEL_NVARS_], uavg[_MODEL_NVARS_];
402 
403  done = 0; _ArraySetValue_(index_outer,ndims,0);
404  while (!done) {
405 
406  _ArrayCopy1D_(index_outer,index_inter,ndims);
407 
408  for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
409 
410  int p; _ArrayIndex1D_(ndims,bounds_inter,index_inter,0,p);
411  int indexL[ndims]; _ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
412  int indexR[ndims]; _ArrayCopy1D_(index_inter,indexR,ndims);
413  int pL; _ArrayIndex1D_(ndims,dim,indexL,ghosts,pL);
414  int pR; _ArrayIndex1D_(ndims,dim,indexR,ghosts,pR);
415 
416  _Euler1DRoeAverage_(uavg,(u+_MODEL_NVARS_*pL),(u+_MODEL_NVARS_*pR),param);
417  for (k = 0; k < _MODEL_NVARS_; k++) udiff[k] = 0.5 * (uR[_MODEL_NVARS_*p+k] - uL[_MODEL_NVARS_*p+k]);
418 
419  double rho, uvel, E, P, c;
420 
421  _Euler1DGetFlowVar_((u+_MODEL_NVARS_*pL),rho,uvel,E,P,param);
422  c = param->gamma*P/rho;
423  double alphaL = c + absolute(uvel);
424 
425  _Euler1DGetFlowVar_((u+_MODEL_NVARS_*pR),rho,uvel,E,P,param);
426  c = param->gamma*P/rho;
427  double alphaR = c + absolute(uvel);
428 
429  _Euler1DGetFlowVar_(uavg,rho,uvel,E,P,param);
430  c = param->gamma*P/rho;
431  double alphaavg = c + absolute(uvel);
432 
433  double kappa = max(param->grav_field[pL],param->grav_field[pR]);
434  double alpha = kappa*max3(alphaL,alphaR,alphaavg);
435 
436  for (k = 0; k < _MODEL_NVARS_; k++) {
437  fI[_MODEL_NVARS_*p+k] = 0.5 * (fL[_MODEL_NVARS_*p+k]+fR[_MODEL_NVARS_*p+k]) - alpha*udiff[k];
438  }
439 
440  }
441 
442  _ArrayIncrementIndex_(ndims,bounds_outer,index_outer,done);
443 
444  }
445 
446  return(0);
447 }
#define max3(a, b, c)
Definition: math_ops.h:27
double gamma
Definition: euler1d.h:274
#define absolute(a)
Definition: math_ops.h:32
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
Definition: euler1d.h:273
int ndims
Definition: hypar.h:26
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _ArraySetValue_(x, size, value)
int * dim_local
Definition: hypar.h:37
#define _ArrayIncrementIndex_(N, imax, i, done)
void * physics
Definition: hypar.h:266
int ghosts
Definition: hypar.h:52
#define _MODEL_NVARS_
Definition: euler1d.h:58
#define _Euler1DGetFlowVar_(u, rho, v, e, P, p)
Definition: euler1d.h:81
#define _DECLARE_IERR_
Definition: basic.h:17
#define _ArrayCopy1D_(x, y, size)
#define max(a, b)
Definition: math_ops.h:18
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
Definition: euler1d.h:169
double * grav_field
Definition: euler1d.h:288

◆ Euler1DUpwinddFRoe()

int Euler1DUpwinddFRoe ( double *  fI,
double *  fL,
double *  fR,
double *  uL,
double *  uR,
double *  u,
int  dir,
void *  s,
double  t 
)

The Roe upwinding scheme (Euler1DUpwindRoe) for the partitioned hyperbolic flux that comprises of the acoustic waves only (see Euler1DStiffFlux, _Euler1DSetStiffFlux_). Thus, only the characteristic fields / eigen-modes corresponding to \( u\pm a\) are used.

Parameters
fIComputed upwind interface flux
fLLeft-biased reconstructed interface flux
fRRight-biased reconstructed interface flux
uLLeft-biased reconstructed interface solution
uRRight-biased reconstructed interface solution
uCell-centered solution
dirSpatial dimension (unused since this is a 1D system)
sSolver object of type HyPar
tCurrent solution time

Definition at line 453 of file Euler1DUpwind.c.

464 {
465  HyPar *solver = (HyPar*) s;
466  Euler1D *param = (Euler1D*) solver->physics;
467  int done,k;
469 
470  int ndims = solver->ndims;
471  int ghosts= solver->ghosts;
472  int *dim = solver->dim_local;
473  double *uref = param->solution;
474 
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;
480 
481  done = 0; _ArraySetValue_(index_outer,ndims,0);
482  while (!done) {
483  _ArrayCopy1D_(index_outer,index_inter,ndims);
484  for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
485  int p; _ArrayIndex1D_(ndims,bounds_inter,index_inter,0,p);
486  int indexL[ndims]; _ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
487  int indexR[ndims]; _ArrayCopy1D_(index_inter,indexR,ndims);
488  int pL; _ArrayIndex1D_(ndims,dim,indexL,ghosts,pL);
489  int pR; _ArrayIndex1D_(ndims,dim,indexR,ghosts,pR);
490  double udiff[_MODEL_NVARS_], uavg[_MODEL_NVARS_],udiss[_MODEL_NVARS_];
491 
492  /* Roe's upwinding scheme */
493 
494  udiff[0] = 0.5 * (uR[_MODEL_NVARS_*p+0] - uL[_MODEL_NVARS_*p+0]);
495  udiff[1] = 0.5 * (uR[_MODEL_NVARS_*p+1] - uL[_MODEL_NVARS_*p+1]);
496  udiff[2] = 0.5 * (uR[_MODEL_NVARS_*p+2] - uL[_MODEL_NVARS_*p+2]);
497 
498  _Euler1DRoeAverage_ (uavg,(uref+_MODEL_NVARS_*pL),(uref+_MODEL_NVARS_*pR),param);
499  _Euler1DEigenvalues_ (uavg,D,param,0);
500  _Euler1DLeftEigenvectors_ (uavg,L,param,0);
501  _Euler1DRightEigenvectors_ (uavg,R,param,0);
502 
503  double kappa = max(param->grav_field[pL],param->grav_field[pR]);
504  k = 0; D[k] = 0.0;
505  k = 4; D[k] = kappa*absolute(D[k]);
506  k = 8; D[k] = kappa*absolute(D[k]);
507 
508  MatMult3(3,DL,D,L);
509  MatMult3(3,modA,R,DL);
510 
511  udiss[0] = modA[0*_MODEL_NVARS_+0]*udiff[0] + modA[0*_MODEL_NVARS_+1]*udiff[1] + modA[0*_MODEL_NVARS_+2]*udiff[2];
512  udiss[1] = modA[1*_MODEL_NVARS_+0]*udiff[0] + modA[1*_MODEL_NVARS_+1]*udiff[1] + modA[1*_MODEL_NVARS_+2]*udiff[2];
513  udiss[2] = modA[2*_MODEL_NVARS_+0]*udiff[0] + modA[2*_MODEL_NVARS_+1]*udiff[1] + modA[2*_MODEL_NVARS_+2]*udiff[2];
514 
515  fI[_MODEL_NVARS_*p+0] = 0.5 * (fL[_MODEL_NVARS_*p+0]+fR[_MODEL_NVARS_*p+0]) - udiss[0];
516  fI[_MODEL_NVARS_*p+1] = 0.5 * (fL[_MODEL_NVARS_*p+1]+fR[_MODEL_NVARS_*p+1]) - udiss[1];
517  fI[_MODEL_NVARS_*p+2] = 0.5 * (fL[_MODEL_NVARS_*p+2]+fR[_MODEL_NVARS_*p+2]) - udiss[2];
518  }
519  _ArrayIncrementIndex_(ndims,bounds_outer,index_outer,done);
520  }
521 
522  return(0);
523 }
#define absolute(a)
Definition: math_ops.h:32
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
Definition: euler1d.h:273
int ndims
Definition: hypar.h:26
#define _Euler1DLeftEigenvectors_(u, L, p, dir)
Definition: euler1d.h:225
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _Euler1DEigenvalues_(u, D, p, dir)
Definition: euler1d.h:207
#define _ArraySetValue_(x, size, value)
int * dim_local
Definition: hypar.h:37
#define _ArrayIncrementIndex_(N, imax, i, done)
void * physics
Definition: hypar.h:266
#define _Euler1DRightEigenvectors_(u, R, p, dir)
Definition: euler1d.h:249
double * solution
Definition: euler1d.h:290
int ghosts
Definition: hypar.h:52
#define MatMult3(N, A, X, Y)
#define _MODEL_NVARS_
Definition: euler1d.h:58
#define _DECLARE_IERR_
Definition: basic.h:17
#define _ArrayCopy1D_(x, y, size)
#define max(a, b)
Definition: math_ops.h:18
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
Definition: euler1d.h:169
double * grav_field
Definition: euler1d.h:288

◆ Euler1DUpwinddFRF()

int Euler1DUpwinddFRF ( double *  fI,
double *  fL,
double *  fR,
double *  uL,
double *  uR,
double *  u,
int  dir,
void *  s,
double  t 
)

The characteristic-based Roe-fixed upwinding scheme (Euler1DUpwindRF) for the partitioned hyperbolic flux that comprises of the acoustic waves only (see Euler1DStiffFlux, _Euler1DSetStiffFlux_). Thus, only the characteristic fields / eigen-modes corresponding to \( u\pm a\) are used.

Reference:

  • Ghosh, D., Constantinescu, E. M., Semi-Implicit Time Integration of Atmospheric Flows with Characteristic-Based Flux Partitioning, SIAM Journal on Scientific Computing, 38 (3), 2016, A1848-A1875, http://dx.doi.org/10.1137/15M1044369
Parameters
fIComputed upwind interface flux
fLLeft-biased reconstructed interface flux
fRRight-biased reconstructed interface flux
uLLeft-biased reconstructed interface solution
uRRight-biased reconstructed interface solution
uCell-centered solution
dirSpatial dimension (unused since this is a 1D system)
sSolver object of type HyPar
tCurrent solution time

Definition at line 534 of file Euler1DUpwind.c.

545 {
546  HyPar *solver = (HyPar*) s;
547  Euler1D *param = (Euler1D*) solver->physics;
548  int done,k;
550 
551  int ndims = solver->ndims;
552  int *dim = solver->dim_local;
553  int ghosts = solver->ghosts;
554  double *uref = param->solution;
555 
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;
560 
561  done = 0; _ArraySetValue_(index_outer,ndims,0);
562  while (!done) {
563  _ArrayCopy1D_(index_outer,index_inter,ndims);
564  for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
565  int p; _ArrayIndex1D_(ndims,bounds_inter,index_inter,0,p);
566  int indexL[ndims]; _ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
567  int indexR[ndims]; _ArrayCopy1D_(index_inter,indexR,ndims);
568  int pL; _ArrayIndex1D_(ndims,dim,indexL,ghosts,pL);
569  int pR; _ArrayIndex1D_(ndims,dim,indexR,ghosts,pR);
570  double uavg[_MODEL_NVARS_], fcL[_MODEL_NVARS_], fcR[_MODEL_NVARS_],
571  ucL[_MODEL_NVARS_], ucR[_MODEL_NVARS_], fc[_MODEL_NVARS_];
572  double kappa = max(param->grav_field[pL],param->grav_field[pR]);
573 
574  /* Roe-Fixed upwinding scheme */
575 
576  _Euler1DRoeAverage_ (uavg,(uref+_MODEL_NVARS_*pL),(uref+_MODEL_NVARS_*pR),param);
577  _Euler1DEigenvalues_ (uavg,D,param,0);
578  _Euler1DLeftEigenvectors_ (uavg,L,param,0);
579  _Euler1DRightEigenvectors_(uavg,R,param,0);
580 
581  /* calculate characteristic fluxes and variables */
586 
587  for (k = 0; k < _MODEL_NVARS_; k++) {
588  double eigL,eigC,eigR;
589  _Euler1DEigenvalues_((u+_MODEL_NVARS_*pL),D,param,0);
590  eigL = (k == 0? 0.0 : D[k*_MODEL_NVARS_+k]);
591  _Euler1DEigenvalues_((u+_MODEL_NVARS_*pR),D,param,0);
592  eigR = (k == 0? 0.0 : D[k*_MODEL_NVARS_+k]);
593  _Euler1DEigenvalues_(uavg,D,param,0);
594  eigC = (k == 0? 0.0 : D[k*_MODEL_NVARS_+k]);
595 
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];
598  else {
599  double alpha = kappa * max3(absolute(eigL),absolute(eigC),absolute(eigR));
600  fc[k] = 0.5 * (fcL[k] + fcR[k] + alpha * (ucL[k]-ucR[k]));
601  }
602 
603  }
604 
605  /* calculate the interface flux from the characteristic flux */
607  }
608  _ArrayIncrementIndex_(ndims,bounds_outer,index_outer,done);
609  }
610 
611  return(0);
612 }
#define max3(a, b, c)
Definition: math_ops.h:27
#define absolute(a)
Definition: math_ops.h:32
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
Definition: euler1d.h:273
int ndims
Definition: hypar.h:26
#define _Euler1DLeftEigenvectors_(u, L, p, dir)
Definition: euler1d.h:225
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define MatVecMult3(N, y, A, x)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _Euler1DEigenvalues_(u, D, p, dir)
Definition: euler1d.h:207
#define _ArraySetValue_(x, size, value)
int * dim_local
Definition: hypar.h:37
#define _ArrayIncrementIndex_(N, imax, i, done)
void * physics
Definition: hypar.h:266
#define _Euler1DRightEigenvectors_(u, R, p, dir)
Definition: euler1d.h:249
double * solution
Definition: euler1d.h:290
int ghosts
Definition: hypar.h:52
#define _MODEL_NVARS_
Definition: euler1d.h:58
#define _DECLARE_IERR_
Definition: basic.h:17
#define _ArrayCopy1D_(x, y, size)
#define max(a, b)
Definition: math_ops.h:18
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
Definition: euler1d.h:169
double * grav_field
Definition: euler1d.h:288

◆ Euler1DUpwinddFLLF()

int Euler1DUpwinddFLLF ( double *  fI,
double *  fL,
double *  fR,
double *  uL,
double *  uR,
double *  u,
int  dir,
void *  s,
double  t 
)

The characteristic-based local Lax-Friedrich upwinding scheme (Euler1DUpwindLLF) for the partitioned hyperbolic flux that comprises of the acoustic waves only (see Euler1DStiffFlux, _Euler1DSetStiffFlux_). Thus, only the characteristic fields / eigen-modes corresponding to \( u\pm a\) are used.

Reference:

  • Ghosh, D., Constantinescu, E. M., Semi-Implicit Time Integration of Atmospheric Flows with Characteristic-Based Flux Partitioning, SIAM Journal on Scientific Computing, 38 (3), 2016, A1848-A1875, http://dx.doi.org/10.1137/15M1044369
Parameters
fIComputed upwind interface flux
fLLeft-biased reconstructed interface flux
fRRight-biased reconstructed interface flux
uLLeft-biased reconstructed interface solution
uRRight-biased reconstructed interface solution
uCell-centered solution
dirSpatial dimension (unused since this is a 1D system)
sSolver object of type HyPar
tCurrent solution time

Definition at line 623 of file Euler1DUpwind.c.

634 {
635  HyPar *solver = (HyPar*) s;
636  Euler1D *param = (Euler1D*) solver->physics;
637  int done,k;
639 
640  int ndims = solver->ndims;
641  int *dim = solver->dim_local;
642  int ghosts = solver->ghosts;
643  double *uref = param->solution;
644 
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;
649 
650  done = 0; _ArraySetValue_(index_outer,ndims,0);
651  while (!done) {
652  _ArrayCopy1D_(index_outer,index_inter,ndims);
653  for (index_inter[dir] = 0; index_inter[dir] < bounds_inter[dir]; index_inter[dir]++) {
654  int p; _ArrayIndex1D_(ndims,bounds_inter,index_inter,0,p);
655  int indexL[ndims]; _ArrayCopy1D_(index_inter,indexL,ndims); indexL[dir]--;
656  int indexR[ndims]; _ArrayCopy1D_(index_inter,indexR,ndims);
657  int pL; _ArrayIndex1D_(ndims,dim,indexL,ghosts,pL);
658  int pR; _ArrayIndex1D_(ndims,dim,indexR,ghosts,pR);
659  double uavg[_MODEL_NVARS_], fcL[_MODEL_NVARS_], fcR[_MODEL_NVARS_],
660  ucL[_MODEL_NVARS_], ucR[_MODEL_NVARS_], fc[_MODEL_NVARS_];
661  double kappa = max(param->grav_field[pL],param->grav_field[pR]);
662 
663  /* Local Lax-Friedrich upwinding scheme */
664 
665  _Euler1DRoeAverage_ (uavg,(uref+_MODEL_NVARS_*pL),(uref+_MODEL_NVARS_*pR),param);
666  _Euler1DEigenvalues_ (uavg,D,param,0);
667  _Euler1DLeftEigenvectors_ (uavg,L,param,0);
668  _Euler1DRightEigenvectors_(uavg,R,param,0);
669 
670  /* calculate characteristic fluxes and variables */
675 
676  for (k = 0; k < _MODEL_NVARS_; k++) {
677  double eigL,eigC,eigR;
678  _Euler1DEigenvalues_((u+_MODEL_NVARS_*pL),D,param,0);
679  eigL = (k == 0? 0.0 : D[k*_MODEL_NVARS_+k]);
680  _Euler1DEigenvalues_((u+_MODEL_NVARS_*pR),D,param,0);
681  eigR = (k == 0? 0.0 : D[k*_MODEL_NVARS_+k]);
682  _Euler1DEigenvalues_(uavg,D,param,0);
683  eigC = (k == 0? 0.0 : D[k*_MODEL_NVARS_+k]);
684 
685  double alpha = kappa * max3(absolute(eigL),absolute(eigC),absolute(eigR));
686  fc[k] = 0.5 * (fcL[k] + fcR[k] + alpha * (ucL[k]-ucR[k]));
687  }
688 
689  /* calculate the interface flux from the characteristic flux */
691  }
692  _ArrayIncrementIndex_(ndims,bounds_outer,index_outer,done);
693  }
694 
695  return(0);
696 }
#define max3(a, b, c)
Definition: math_ops.h:27
#define absolute(a)
Definition: math_ops.h:32
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
Definition: euler1d.h:273
int ndims
Definition: hypar.h:26
#define _Euler1DLeftEigenvectors_(u, L, p, dir)
Definition: euler1d.h:225
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
#define MatVecMult3(N, y, A, x)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _Euler1DEigenvalues_(u, D, p, dir)
Definition: euler1d.h:207
#define _ArraySetValue_(x, size, value)
int * dim_local
Definition: hypar.h:37
#define _ArrayIncrementIndex_(N, imax, i, done)
void * physics
Definition: hypar.h:266
#define _Euler1DRightEigenvectors_(u, R, p, dir)
Definition: euler1d.h:249
double * solution
Definition: euler1d.h:290
int ghosts
Definition: hypar.h:52
#define _MODEL_NVARS_
Definition: euler1d.h:58
#define _DECLARE_IERR_
Definition: basic.h:17
#define _ArrayCopy1D_(x, y, size)
#define max(a, b)
Definition: math_ops.h:18
#define _Euler1DRoeAverage_(uavg, uL, uR, p)
Definition: euler1d.h:169
double * grav_field
Definition: euler1d.h:288