|
HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains the functions to compute the hyperbolic flux for the 2D shallow water equations over the domain. More...
#include <stdlib.h>#include <arrayfunctions.h>#include <physicalmodels/shallowwater2d.h>#include <hypar.h>Go to the source code of this file.
Functions | |
| int | ShallowWater2DFlux (double *f, double *u, int dir, void *s, double t) |
Contains the functions to compute the hyperbolic flux for the 2D shallow water equations over the domain.
Definition in file ShallowWater2DFlux.c.
| int ShallowWater2DFlux | ( | double * | f, |
| double * | u, | ||
| int | dir, | ||
| void * | s, | ||
| double | t | ||
| ) |
Compute the hyperbolic flux over the local domain.
\begin{equation} {\bf F}\left({\bf u}\right) = \left\{\begin{array}{cc} \left[\begin{array}{c} hu \\ hu^2 + \frac{1}{2} gh^2 \\ huv \end{array}\right] & {\rm dir} = x \\ \left[\begin{array}{c} hv \\ huv \\ hv^2 + \frac{1}{2} gh^2 \end{array}\right] & {\rm dir} = y \\ \end{array}\right. \end{equation}
| f | Array to hold the computed flux (same size and layout as u) |
| u | Array containing the conserved solution |
| dir | Spatial dimension |
| s | Solver object of type HyPar |
| t | Current time |
Definition at line 20 of file ShallowWater2DFlux.c.