version 3.8
ccmpfa.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//
13#ifndef DUMUX_DISCRETIZATION_CC_MPFA_HH
14#define DUMUX_DISCRETIZATION_CC_MPFA_HH
15
16#include <dune/common/reservedvector.hh>
17
21
23
25
28
36
38
40
41namespace Dumux {
42namespace Properties {
43
45// Create new type tags
46namespace TTag {
47struct CCMpfaModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
48} // end namespace TTag
49
51template<class TypeTag>
52struct DualGridNodalIndexSet<TypeTag, TTag::CCMpfaModel>
53{
54private:
57
58public:
60};
61
63template<class TypeTag>
64struct PrimaryInteractionVolume<TypeTag, TTag::CCMpfaModel>
65{
66private:
69
70 // use the default traits
72public:
74};
75
77template<class TypeTag>
78struct SecondaryInteractionVolume<TypeTag, TTag::CCMpfaModel>
79{
80private:
83
84 // use the default traits
86public:
88};
89
91template<class TypeTag>
92struct GridGeometry<TypeTag, TTag::CCMpfaModel>
93{
94private:
100public:
102};
103
105template<class TypeTag>
106struct GridVolumeVariables<TypeTag, TTag::CCMpfaModel>
107{
108private:
109 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
112public:
114};
115
117template<class TypeTag>
118struct GridFluxVariablesCache<TypeTag, TTag::CCMpfaModel>
119{
120private:
121 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
123
125 using FluxVariablesCache = GetPropTypeOr<TypeTag,
126 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
127 >;
128 using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
129 Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
130 >;
131
132 using PrimaryInteractionVolume = GetPropType<TypeTag, Properties::PrimaryInteractionVolume>;
133 using SecondaryInteractionVolume = GetPropType<TypeTag, Properties::SecondaryInteractionVolume>;
134
136 using PrimaryMatVecTraits = typename PrimaryInteractionVolume::Traits::MatVecTraits;
137 using SecondaryMatVecTraits = typename SecondaryInteractionVolume::Traits::MatVecTraits;
138
141
143 FluxVariablesCache, FluxVariablesCacheFiller,
144 PrimaryInteractionVolume, SecondaryInteractionVolume,
146public:
148};
149
151template<class TypeTag>
152struct ElementBoundaryTypes<TypeTag, TTag::CCMpfaModel> { using type = CCElementBoundaryTypes; };
153
155template<class TypeTag>
156struct BaseLocalResidual<TypeTag, TTag::CCMpfaModel> { using type = CCLocalResidual<TypeTag>; };
157} // namespace Properties
158
159namespace Detail {
160
161template<class Problem>
162struct ProblemTraits<Problem, DiscretizationMethods::CCMpfa>
163{
164private:
165 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
166 using Element = typename GG::GridView::template Codim<0>::Entity;
167 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
168public:
169 using GridGeometry = GG;
170 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scvf)
171 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>;
172};
173
174} // end namespace Detail
175
176} // namespace Dumux
177
178#endif
Calculates the element-wise residual for cell-centered discretization schemes.
Boundary types gathered on an element.
The local element solution class for cell-centered methods.
Traits class to be used in conjunction with the CCMpfaFVGridGeometry.
The grid volume variables class for cell centered mpfa models.
Boundary types gathered on an element.
Definition: cellcentered/elementboundarytypes.hh:26
Calculates the element-wise residual for the cell-centered discretization schemes.
Definition: cclocalresidual.hh:31
Nodal index set for mpfa schemes, constructed around grid vertices.
Definition: dualgridindexset.hh:58
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:40
Flux variable caches on a gridview.
Definition: discretization/cellcentered/mpfa/gridfluxvariablescache.hh:73
Base class for the grid volume variables.
Definition: cellcentered/mpfa/gridvolumevariables.hh:48
Forward declaration of the o-method's interaction volume.
Definition: discretization/cellcentered/mpfa/omethod/interactionvolume.hh:103
Class for the interaction volume data handle.
Definition: interactionvolumedatahandle.hh:226
Defines all properties used in Dumux.
Type traits for problem classes.
Defines the default element and vertex mapper types.
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Flux variable caches on a gridview.
Class for the interaction volume of the mpfa-o scheme.
Class for the index sets of the dual grid in mpfa schemes.
Classes related to flux variables caching.
Declares properties required for finite-volume models models.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
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:303
Data handle class for interaction volumes of mpfa methods. This class is passed to interaction volume...
The available mpfa schemes in Dumux.
Definition: adapt.hh:17
Data handle physics traits.
Definition: discretization/cellcentered/mpfa/gridfluxvariablescache.hh:45
Traits class to be used for the CCMpfaFVGridGeometry.
Definition: cellcentered/mpfa/fvgridgeometrytraits.hh:38
The default interaction volume traits class for the mpfa-o method. This uses dynamic types types for ...
Definition: discretization/cellcentered/mpfa/omethod/interactionvolume.hh:48
std::decay_t< decltype(std::declval< Problem >().boundaryTypes(std::declval< Element >(), std::declval< SubControlVolumeFace >()))> BoundaryTypes
Definition: ccmpfa.hh:171
Definition: common/typetraits/problem.hh:23
The empty filler class corresponding to EmptyCache.
Definition: fluxvariablescaching.hh:20
An empty flux variables cache.
Definition: fluxvariablescaching.hh:35
Data handle physics traits.
Definition: discretization/cellcentered/mpfa/gridfluxvariablescache.hh:27
Default traits to be used in conjunction with the dual grid nodal index set.
Definition: dualgridindexset.hh:33
Definition: ccmpfa.hh:47
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: ccmpfa.hh:47