version 3.8
freeflow/shallowwater/fluxvariables.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_FREEFLOW_SHALLOW_WATER_FLUXVARIABLES_HH
13#define DUMUX_FREEFLOW_SHALLOW_WATER_FLUXVARIABLES_HH
14
18
19namespace Dumux {
20
26template<class TypeTag>
28: public FluxVariablesBase<GetPropType<TypeTag, Properties::Problem>,
29 typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView,
30 typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView,
31 typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView>
32{
38
40 using GridVolumeVariables = typename GridVariables::GridVolumeVariables;
42 using FVElementGeometry = typename GridGeometry::LocalView;
43 using GridView = typename GridGeometry::GridView;
44
45 using Element = typename GridView::template Codim<0>::Entity;
46 using ElementVolumeVariables = typename GridVolumeVariables::LocalView;
47 using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
48
49 static constexpr bool enableAdvection = ModelTraits::enableAdvection();
50
51public:
52
57 NumEqVector advectiveFlux(const Problem& problem,
58 const Element& element,
59 const FVElementGeometry& fvGeometry,
60 const ElementVolumeVariables& elemVolVars,
61 const SubControlVolumeFace& scvf) const
62 {
63 if (enableAdvection)
64 return AdvectionType::flux(problem, element, fvGeometry, elemVolVars, scvf);
65
66 return NumEqVector(0.0);
67 }
68
73 NumEqVector viscousFlux(const Problem& problem,
74 const Element& element,
75 const FVElementGeometry& fvGeometry,
76 const ElementVolumeVariables& elemVolVars,
77 const SubControlVolumeFace& scvf) const
78 {
79 // Add viscous momentum flux
80 return ViscousFluxType::flux(problem, element, fvGeometry, elemVolVars, scvf);
81 }
82};
83
84} // end namespace Dumux
85
86#endif
Base class for the flux variables living on a sub control volume face.
Definition: fluxvariablesbase.hh:33
The flux variables class for the shallow water model.
Definition: freeflow/shallowwater/fluxvariables.hh:32
NumEqVector advectiveFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf) const
Returns the advective flux computed by the Riemann solver.
Definition: freeflow/shallowwater/fluxvariables.hh:57
NumEqVector viscousFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf) const
Returns the viscous momentum flux.
Definition: freeflow/shallowwater/fluxvariables.hh:73
Defines all properties used in Dumux.
Base class for the flux variables living on a sub control volume face.
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
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
A helper to deduce a vector with the same size as numbers of equations.