HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
ShallowWater2DFunctions.c File Reference

Miscellaneous functions for the 2D shallow water equations. More...

#include <math.h>
#include <basic.h>
#include <physicalmodels/shallowwater2d.h>

Go to the source code of this file.

Functions

int ShallowWater2DRoeAverage (double *uavg, double *uL, double *uR, void *p)
 

Detailed Description

Miscellaneous functions for the 2D shallow water equations.

Author
Debojyoti Ghosh

Definition in file ShallowWater2DFunctions.c.

Function Documentation

◆ ShallowWater2DRoeAverage()

int ShallowWater2DRoeAverage ( double *  uavg,
double *  uL,
double *  uR,
void *  p 
)

Compute the Roe-averaged state for the 2D shallow water equations. This function just calls the macro _ShallowWater2DRoeAverage_ and is not used by any functions within the 2D shallow water module. However, it's necessary to define it and provide it to the the solver object (HyPar) so that it can then send it to interpolation functions for a characteristic-based reconstruction.

Parameters
uavgThe computed Roe-averaged state
uLLeft state (conserved variables)
uRRight state (conserved variables)
pObject of type ShallowWater2D with physics-related variables

Definition at line 16 of file ShallowWater2DFunctions.c.

22 {
23  ShallowWater2D *param = (ShallowWater2D*) p;
24  _ShallowWater2DRoeAverage_(uavg,uL,uR,param);
25  return(0);
26 }
#define _ShallowWater2DRoeAverage_(uavg, uL, uR, p)
Structure containing variables and parameters specific to the 2D Shallow Water equations. This structure contains the physical parameters, variables, and function pointers specific to the 2D ShallowWater equations.