HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
euler1d_gpu.h
Go to the documentation of this file.
2 
3 #define _Euler1DGetFlowVar_GPU(u,rho,v,e,P,gamma) \
4  { \
5  rho = u[0]; \
6  v = u[1] / rho; \
7  e = u[2]; \
8  P = (e - 0.5*rho*v*v) * (gamma-1.0); \
9  }
10 
11 #define _gpuEuler1DGetFlowVar2_(u,np,rho,v,e,P,gamma) \
12  { \
13  rho = u[0]; \
14  v = u[np] / rho; \
15  e = u[2*np]; \
16  P = (e - 0.5*rho*v*v) * (gamma-1.0); \
17  }
18 
19 
1D Euler Equations (inviscid, compressible flows)