HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Functions to compute the hyperbolic flux for 3D Navier-Stokes equations. More...
#include <basic_gpu.h>
#include <arrayfunctions_gpu.h>
#include <mathfunctions.h>
#include <matmult_native.h>
#include <physicalmodels/navierstokes3d.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
__global__ void | gpuNavierStokes3DFlux_kernel (int npoints_grid, int dir, double gamma, const double *__restrict__ u, double *__restrict__ f) |
int | gpuNavierStokes3DFlux (double *__restrict__ f, double *__restrict__ u, int dir, void *__restrict__ s, double t) |
Functions to compute the hyperbolic flux for 3D Navier-Stokes equations.
Definition in file NavierStokes3DFlux_GPU.cu.
__global__ void gpuNavierStokes3DFlux_kernel | ( | int | npoints_grid, |
int | dir, | ||
double | gamma, | ||
const double *__restrict__ | u, | ||
double *__restrict__ | f | ||
) |
Kernel for gpuNavierStokes3DFlux()
Definition at line 69 of file NavierStokes3DFlux_GPU.cu.
int gpuNavierStokes3DFlux | ( | double *__restrict__ | f, |
double *__restrict__ | u, | ||
int | dir, | ||
void *__restrict__ | s, | ||
double | t | ||
) |
Compute the hyperbolic flux function for the 3D Navier-Stokes equations:
\begin{eqnarray} dir = x, & {\bf f}\left({\bf u}\right) = \left[\begin{array}{c} \rho u \\ \rho u^2 + p \\ \rho u v \\ \rho u w \\ (e+p)u \end{array}\right], \\ dir = y, & {\bf f}\left({\bf u}\right) = \left[\begin{array}{c} \rho v \\ \rho u v \\ \rho v^2 + p \\ \rho v w \\ (e+p)v \end{array}\right], \\ dir = z, & {\bf f}\left({\bf u}\right) = \left[\begin{array}{c} \rho w \\ \rho u w \\ \rho v w \\ \rho w^2 + p \\ (e+p)w \end{array}\right] \end{eqnarray}
Note: the flux function needs to be computed at the ghost points as well.
f | Array to hold the computed flux vector (same layout as u) |
u | Array with the solution vector |
dir | Spatial dimension (x, y, or z) for which to compute the flux |
s | Solver object of type HyPar |
t | Current simulation time |
Definition at line 96 of file NavierStokes3DFlux_GPU.cu.