HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains the functions compute flux Jacobians for the 2D shallow water system. More...
Go to the source code of this file.
Functions | |
int | ShallowWater2DJacobian (double *Jac, double *u, void *p, int dir, int nvars, int upw) |
Contains the functions compute flux Jacobians for the 2D shallow water system.
Definition in file ShallowWater2DJacobian.c.
int ShallowWater2DJacobian | ( | double * | Jac, |
double * | u, | ||
void * | p, | ||
int | dir, | ||
int | nvars, | ||
int | upw | ||
) |
Function to compute the flux Jacobian of the 2D 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 = 9 |
u | solution at a grid point (array of size nvar = 3) |
p | object containing the physics-related parameters |
dir | spatial dimension (x/y) |
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 ShallowWater2DJacobian.c.