HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains the functions compute flux Jacobians for the 1D shallow water system. More...
Go to the source code of this file.
Functions | |
int | ShallowWater1DJacobian (double *Jac, double *u, void *p, int dir, int nvars, int upw) |
Contains the functions compute flux Jacobians for the 1D shallow water system.
Definition in file ShallowWater1DJacobian.c.
int ShallowWater1DJacobian | ( | double * | Jac, |
double * | u, | ||
void * | p, | ||
int | dir, | ||
int | nvars, | ||
int | upw | ||
) |
Function to compute the flux Jacobian of the 1D shallow water equations, given the solution at a grid point. The Jacobian is square matrix of size nvar=2, and is returned as a 1D array (double) of 4 elements in row-major format.
Jac | Jacobian matrix: 1D array of size nvar^2 = 4 |
u | solution at a grid point (array of size nvar = 2) |
p | object containing the physics-related parameters |
dir | dimension (x/y/z) (not used, since this is 1D system) |
nvars | number of vector components |
upw | 0 -> send back complete Jacobian, 1 -> send back Jacobian of right(+)-moving flux, -1 -> send back Jacobian of left(-)-moving flux |
Definition at line 14 of file ShallowWater1DJacobian.c.