3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
fcstaggered.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 *****************************************************************************/
27#ifndef DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_HH
28#define DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_HH
29
32
37
42
43namespace Dumux::Properties {
44
46// Create new type tags
47namespace TTag {
48struct FaceCenteredStaggeredModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
49} // end namespace TTag
50
52template<class TypeTag>
53struct GridGeometry<TypeTag, TTag::FaceCenteredStaggeredModel>
54{
55private:
56 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
58public:
60};
61
63template<class TypeTag>
64struct GridVolumeVariables<TypeTag, TTag::FaceCenteredStaggeredModel>
65{
66private:
67 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
71public:
73};
74
75
77template<class TypeTag>
78struct GridFluxVariablesCache<TypeTag, TTag::FaceCenteredStaggeredModel>
79{
80private:
81 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
84 using FluxVariablesCache = GetPropTypeOr<TypeTag,
86 >;
87 using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
89 >;
90public:
92};
93
95template<class TypeTag>
96struct GridVariables<TypeTag, TTag::FaceCenteredStaggeredModel>
97{
98private:
102public:
104};
105
107template<class TypeTag>
108struct BaseLocalResidual<TypeTag, TTag::FaceCenteredStaggeredModel> { using type = FaceCenteredLocalResidual<TypeTag>; };
109
111template<class TypeTag>
112struct ElementBoundaryTypes<TypeTag, TTag::FaceCenteredStaggeredModel>
113{
114private:
116 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
117public:
119};
120
121} // namespace Dumux::Properties
122
123namespace Dumux::Detail {
124
125template<class Problem>
126struct ProblemTraits<Problem, DiscretizationMethods::FCStaggered>
127{
128private:
129 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
130 using Element = typename GG::GridView::template Codim<0>::Entity;
131 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
132public:
133 using GridGeometry = GG;
134 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scv)
135 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>;
136};
137
138} // end namespace Detail
139
140#endif
Calculates the element-wise residual for the box scheme.
Declares properties required for finite-volume models models.
The available discretization methods in Dumux.
Classes related to flux variables caching.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
typename GetPropOr< TypeTag, Property, T >::type GetPropTypeOr
get the type alias defined in the property or the type T if the property is undefined
Definition: propertysystem.hh:184
Distance implementation details.
Definition: cvfelocalresidual.hh:37
Definition: common/properties.hh:37
The element-wise residual for the box scheme.
Definition: fclocalresidual.hh:46
The type of the base class of the local residual (specific to a discretization scheme)
Definition: common/properties.hh:63
Stores the boundary types on an element.
Definition: common/properties.hh:97
Definition: common/properties.hh:100
The type for a global container for the volume variables.
Definition: common/properties.hh:107
Stores data associated with flux vars.
Definition: common/properties.hh:113
The engine behind the global flux cache (how to fill caches for the stencil)
Definition: common/properties.hh:115
The global vector of flux variable containers.
Definition: common/properties.hh:117
The grid variables object managing variable data on the grid (volvars/fluxvars cache)
Definition: common/properties.hh:121
Definition: common/typetraits/problem.hh:35
typename Detail::template ProblemTraits< Problem, typename GridGeometry::DiscretizationMethod >::BoundaryTypes BoundaryTypes
Definition: common/typetraits/problem.hh:46
This class stores an array of BoundaryTypes objects.
Definition: facecentered/staggered/elementboundarytypes.hh:37
Base class for the finite volume geometry vector for face-centered staggered models This builds up th...
Definition: discretization/facecentered/staggered/fvgridgeometry.hh:96
Flux variable caches on a gridview.
Definition: discretization/facecentered/staggered/gridfluxvariablescache.hh:60
Definition: facecentered/staggered/gridvolumevariables.hh:41
Base class for the grid volume variables.
Definition: facecentered/staggered/gridvolumevariables.hh:57
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: fcstaggered.hh:48
std::decay_t< decltype(std::declval< Problem >().boundaryTypes(std::declval< Element >(), std::declval< SubControlVolumeFace >()))> BoundaryTypes
Definition: fcstaggered.hh:135
The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux ...
Definition: discretization/fvgridvariables.hh:42
The empty filler class corresponding to EmptyCache.
Definition: fluxvariablescaching.hh:32
An empty flux variables cache.
Definition: fluxvariablescaching.hh:47
Declares all properties used in Dumux.
Type traits for problem classes.
Boundary types gathered on an element.
Global flux variable cache.
The grid volume variables class for face-centered staggered models.