3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
box.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 3 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 *****************************************************************************/
25#ifndef DUMUX_DISCRETIZTAION_BOX_HH
26#define DUMUX_DISCRETIZTAION_BOX_HH
27
28#include <type_traits>
29
30#include <dune/common/fvector.hh>
31#include <dune/geometry/multilineargeometry.hh>
32
36
38
41
47
48namespace Dumux {
49namespace Properties {
50
52// Create new type tags
53namespace TTag {
54struct BoxModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
55} // end namespace TTag
56
58template<class TypeTag>
59struct GridGeometry<TypeTag, TTag::BoxModel>
60{
61private:
62 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
65public:
67};
68
70template<class TypeTag>
71struct GridVolumeVariables<TypeTag, TTag::BoxModel>
72{
73private:
74 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
77public:
79};
80
82template<class TypeTag>
83struct GridFluxVariablesCache<TypeTag, TTag::BoxModel>
84{
85private:
86 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
89public:
91};
92
94template<class TypeTag>
95struct ElementBoundaryTypes<TypeTag, TTag::BoxModel>
96{
97private:
99 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
100public:
102};
103
105template<class TypeTag>
106struct BaseLocalResidual<TypeTag, TTag::BoxModel> { using type = BoxLocalResidual<TypeTag>; };
107
108} // namespace Properties
109
110namespace Detail {
111
112template<class Problem>
114{
115private:
116 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
117 using Element = typename GG::GridView::template Codim<0>::Entity;
118 using SubControlVolume = typename GG::SubControlVolume;
119public:
120 using GridGeometry = GG;
121 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scv)
122 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolume>()))>;
123};
124
125} // end namespace Detail
126
127} // namespace Dumux
128
129#endif
Calculates the element-wise residual for the box scheme.
Boundary flag to store e.g. in sub control volume faces.
The available discretization methods in Dumux.
Declares properties required for finite-volume models models.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
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
The element-wise residual for the box scheme.
Definition: boxlocalresidual.hh:45
The type of the base class of the local residual (specific to a discretization scheme)
Definition: common/properties.hh:65
Stores the boundary types on an element.
Definition: common/properties.hh:98
Definition: common/properties.hh:101
The type for a global container for the volume variables.
Definition: common/properties.hh:108
The global vector of flux variable containers.
Definition: common/properties.hh:118
Definition: common/typetraits/problem.hh:35
typename Detail::template ProblemTraits< Problem, GridGeometry::discMethod >::BoundaryTypes BoundaryTypes
Definition: common/typetraits/problem.hh:46
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: box.hh:54
std::decay_t< decltype(std::declval< Problem >().boundaryTypes(std::declval< Element >(), std::declval< SubControlVolume >()))> BoundaryTypes
Definition: box.hh:122
This class stores an array of BoundaryTypes objects.
Definition: box/elementboundarytypes.hh:38
Base class for the finite volume geometry vector for box schemes This builds up the sub control volum...
Definition: discretization/box/fvgridgeometry.hh:72
Flux variable caches on a gridview.
Definition: box/gridfluxvariablescache.hh:56
Base class for the grid volume variables.
Definition: box/gridvolumevariables.hh:54
Declares all properties used in Dumux.
Type traits for problem classes.
Boundary types gathered on an element.
The local element solution class for the box method.
Base class for the finite volume geometry vector for box models This builds up the sub control volume...
Global flux variable cache.
The grid volume variables class for box models.