12#ifndef DUMUX_FLUX_SHALLOW_WATER_FLUX_HH 
   13#define DUMUX_FLUX_SHALLOW_WATER_FLUX_HH 
   35template<
class NumEqVector>
 
   49    template<
class Problem, 
class FVElementGeometry, 
class ElementVolumeVariables>
 
   51                            const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
 
   52                            const FVElementGeometry& fvGeometry,
 
   53                            const ElementVolumeVariables& elemVolVars,
 
   54                            const typename FVElementGeometry::SubControlVolumeFace& scvf)
 
   58        const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
 
   59        const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
 
   60        const auto& nxy = scvf.unitOuterNormal();
 
   61        const auto gravity = problem.spatialParams().gravity(scvf.center());
 
   64                                                        outsideVolVars.waterDepth(),
 
   65                                                        insideVolVars.velocity(0),
 
   66                                                        outsideVolVars.velocity(0),
 
   67                                                        insideVolVars.velocity(1),
 
   68                                                        outsideVolVars.velocity(1),
 
   69                                                        insideVolVars.bedSurface(),
 
   70                                                        outsideVolVars.bedSurface(),
 
   75        localFlux[0] = riemannFlux[0] * scvf.area();
 
   76        localFlux[1] = riemannFlux[1] * scvf.area();
 
   77        localFlux[2] = riemannFlux[2] * scvf.area();
 
 
 
Prepare and compute the shallow water advective flux.
Definition shallowwaterflux.hh:37
FluxVariablesCaching::EmptyAdvectionCache Cache
Definition shallowwaterflux.hh:41
FluxVariablesCaching::EmptyCacheFiller CacheFiller
Definition shallowwaterflux.hh:42
Classes related to flux variables caching.
typename NumEqVectorTraits< PrimaryVariables >::type NumEqVector
A vector with the same size as numbers of equations This is the default implementation and has to be ...
Definition numeqvector.hh:34
static NumEqVector flux(const Problem &problem, const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolumeFace &scvf)
Prepares and compute the shallow water advective flux.
Definition shallowwaterflux.hh:50
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
This file includes a function to construct the Riemann problem.
Empty caches to use in a constitutive flux law/process, e.g. Darcy's law.
Definition fluxvariablescaching.hh:54
The empty filler class corresponding to EmptyCache.
Definition fluxvariablescaching.hh:20