3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_FREEFLOW_SHALLOW_WATER_FLUXVARIABLES_HH
25#define DUMUX_FREEFLOW_SHALLOW_WATER_FLUXVARIABLES_HH
26
29
30namespace Dumux {
31
37template<class TypeTag>
39: public FluxVariablesBase<GetPropType<TypeTag, Properties::Problem>,
40 typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView,
41 typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView,
42 typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView>
43{
48 //using DiffusionType = GetPropType<TypeTag, Properties::DiffusionType>;
49
51 using GridVolumeVariables = typename GridVariables::GridVolumeVariables;
53 using FVElementGeometry = typename GridGeometry::LocalView;
54 using GridView = typename GridGeometry::GridView;
55
56 using Element = typename GridView::template Codim<0>::Entity;
57 using ElementVolumeVariables = typename GridVolumeVariables::LocalView;
58 using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
59
60 static constexpr bool enableAdvection = ModelTraits::enableAdvection();
61 static constexpr bool enableDiffusion = ModelTraits::enableDiffusion();
62
63public:
64
69 NumEqVector advectiveFlux(const Problem& problem,
70 const Element& element,
71 const FVElementGeometry& fvGeometry,
72 const ElementVolumeVariables& elemVolVars,
73 const SubControlVolumeFace& scvf) const
74 {
75 if (enableAdvection)
76 return AdvectionType::flux(problem, element, fvGeometry, elemVolVars, scvf);
77
78 return NumEqVector(0.0);
79 }
80
85 NumEqVector diffusiveFlux(const Problem& problem,
86 const Element& element,
87 const FVElementGeometry& fvGeometry,
88 const ElementVolumeVariables& elemVolVars,
89 const SubControlVolumeFace& scvf) const
90 {
91 // TODO: add diffusive flux (e.g. tracer and viscosity)
92 if (enableDiffusion)
93 return NumEqVector(0.0);
94
95 return NumEqVector(0.0);
96 }
97};
98
99} // end namespace Dumux
100
101#endif
Base class for the flux variables living on a sub control volume face.
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Base class for the flux variables living on a sub control volume face.
Definition: fluxvariablesbase.hh:45
The flux variables class for the shallow water model.
Definition: freeflow/shallowwater/fluxvariables.hh:43
NumEqVector diffusiveFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf) const
Returns the diffusive flux (e.g. diffusion of tracer)
Definition: freeflow/shallowwater/fluxvariables.hh:85
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:69
Declares all properties used in Dumux.