60                                    const Scalar waterDepthRight,
 
   62                                    Scalar velocityXRight,
 
   64                                    Scalar velocityYRight,
 
   65                                    const Scalar bedSurfaceLeft,
 
   66                                    const Scalar bedSurfaceRight,
 
   68                                    const GlobalPosition& nxy)
 
   73    const Scalar dzl = max(0.0, bedSurfaceRight - bedSurfaceLeft);
 
   74    const Scalar waterDepthLeftReconstructed = max(0.0, waterDepthLeft - dzl);
 
   75    const Scalar dzr = max(0.0, bedSurfaceLeft - bedSurfaceRight);
 
   76    const Scalar waterDepthRightReconstructed = max(0.0, waterDepthRight - dzr);
 
   79    Scalar tempFlux = velocityXLeft;
 
   80    velocityXLeft =  nxy[0] * tempFlux + nxy[1] * velocityYLeft;
 
   81    velocityYLeft = -nxy[1] * tempFlux + nxy[0] * velocityYLeft;
 
   83    tempFlux = velocityXRight;
 
   84    velocityXRight =  nxy[0] * tempFlux + nxy[1] * velocityYRight;
 
   85    velocityYRight = -nxy[1] * tempFlux + nxy[0] * velocityYRight;
 
   88                                                    waterDepthRightReconstructed,
 
   96    tempFlux = riemannResult.flux[1];
 
   97    riemannResult.flux[1] = nxy[0] * tempFlux - nxy[1] * riemannResult.flux[2];
 
   98    riemannResult.flux[2] = nxy[1] * tempFlux + nxy[0] * riemannResult.flux[2];
 
  101    const Scalar hgzl = 0.5 * (waterDepthLeftReconstructed + waterDepthLeft) * (waterDepthLeftReconstructed - waterDepthLeft);
 
  102    const Scalar hdxzl = gravity * nxy[0] * hgzl;
 
  103    const Scalar hdyzl = gravity * nxy[1] * hgzl;
 
  114    static const Scalar upperWaterDepthFluxLimiting = 
getParam<Scalar>(
"FluxLimiterLET.UpperWaterDepth", 1e-3);
 
  115    static const Scalar lowerWaterDepthFluxLimiting = 
getParam<Scalar>(
"FluxLimiterLET.LowerWaterDepth", 1e-5);
 
  116    static const bool upwindWaterDepthFluxLimiting = 
getParam<bool>(
"FluxLimiterLET.UpwindFluxLimiting", 
false);
 
  118    Scalar limitingDepth = (waterDepthLeftReconstructed + waterDepthRightReconstructed) * 0.5;
 
  121    if (upwindWaterDepthFluxLimiting)
 
  123        if (riemannResult.flux[0] < 0)
 
  125            limitingDepth = waterDepthRightReconstructed;
 
  128            limitingDepth = waterDepthLeftReconstructed;
 
  134                                                         upperWaterDepthFluxLimiting,
 
  135                                                         lowerWaterDepthFluxLimiting);
 
  136    std::array<Scalar, 3> localFlux;
 
  137    localFlux[0] = riemannResult.flux[0] * mobility;
 
  138    localFlux[1] = (riemannResult.flux[1] - hdxzl);
 
  139    localFlux[2] = (riemannResult.flux[2] - hdyzl);
 
 
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition parameters.hh:139
RiemannSolution< Scalar > exactRiemann(const Scalar dl, const Scalar dr, const Scalar ul, const Scalar ur, const Scalar vl, const Scalar vr, const Scalar grav, const Scalar s=0.0)
Exact Riemann solver for the shallow water equations.
Definition exactriemann.hh:54
static Scalar fluxLimiterLET(const Scalar valueLeft, const Scalar valueRight, const Scalar upperH, const Scalar lowerH)
Flux limiter function to scale fluxes for small water depths.
Definition fluxlimiterlet.hh:40
std::array< Scalar, 3 > riemannProblem(const Scalar waterDepthLeft, const Scalar waterDepthRight, Scalar velocityXLeft, Scalar velocityXRight, Scalar velocityYLeft, Scalar velocityYRight, const Scalar bedSurfaceLeft, const Scalar bedSurfaceRight, const Scalar gravity, const GlobalPosition &nxy)
Construct a Riemann problem and solve it.
Definition riemannproblem.hh:59