|
HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains the functions to compute the hyperbolic flux for the 1D shallow water equations over the domain. More...
#include <stdlib.h>#include <arrayfunctions.h>#include <physicalmodels/shallowwater1d.h>#include <hypar.h>Go to the source code of this file.
Functions | |
| int | ShallowWater1DFlux (double *f, double *u, int dir, void *s, double t) |
Contains the functions to compute the hyperbolic flux for the 1D shallow water equations over the domain.
Definition in file ShallowWater1DFlux.c.
| int ShallowWater1DFlux | ( | 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}{c} hu \\ hu^2 + \frac{1}{2} gh^2 \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 (unused since this is a 1D system) |
| s | Solver object of type HyPar |
| t | Current time |
Definition at line 16 of file ShallowWater1DFlux.c.