version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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-FileCopyrightText: 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 <concepts>
17#include <type_traits>
18
19#include <dune/common/reservedvector.hh>
20
24
26
30
33
41
43
45
46namespace Dumux {
47namespace Properties {
48
50// Create new type tags
51namespace TTag {
52struct CCMpfaModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
53} // end namespace TTag
54
56template<class TypeTag>
57struct DualGridNodalIndexSet<TypeTag, TTag::CCMpfaModel>
58{
59private:
62
63public:
65};
66
68template<class TypeTag>
69struct PrimaryInteractionVolume<TypeTag, TTag::CCMpfaModel>
70{
71private:
74
75 // use the default traits
77public:
79};
80
82template<class TypeTag>
83struct SecondaryInteractionVolume<TypeTag, TTag::CCMpfaModel>
84{
85private:
88
89 // use the default traits
91public:
93};
94
96template<class TypeTag>
97struct GridGeometry<TypeTag, TTag::CCMpfaModel>
98{
99private:
105public:
107};
108
110template<class TypeTag>
111struct GridVolumeVariables<TypeTag, TTag::CCMpfaModel>
112{
113private:
114 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
117public:
119};
120
122template<class TypeTag>
123struct GridFluxVariablesCache<TypeTag, TTag::CCMpfaModel>
124{
125private:
126 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
128
130 using FluxVariablesCache = GetPropTypeOr<TypeTag,
131 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
132 >;
133 using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
134 Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
135 >;
136
137 using PrimaryInteractionVolume = GetPropType<TypeTag, Properties::PrimaryInteractionVolume>;
138 using SecondaryInteractionVolume = GetPropType<TypeTag, Properties::SecondaryInteractionVolume>;
139
141 using PrimaryMatVecTraits = typename PrimaryInteractionVolume::Traits::MatVecTraits;
142 using SecondaryMatVecTraits = typename SecondaryInteractionVolume::Traits::MatVecTraits;
143
146
148 FluxVariablesCache, FluxVariablesCacheFiller,
149 PrimaryInteractionVolume, SecondaryInteractionVolume,
151public:
153};
154
156template<class TypeTag>
157struct ElementBoundaryTypes<TypeTag, TTag::CCMpfaModel> { using type = CCElementBoundaryTypes; };
158
159} // namespace Properties
160
161namespace Detail {
162
163template<class Problem>
164struct ProblemTraits<Problem, DiscretizationMethods::CCMpfa>
165{
166private:
167 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
168 using Element = typename GG::GridView::template Codim<0>::Entity;
169 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
170public:
171 using GridGeometry = GG;
172 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scvf)
173 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>;
174};
175
176template<class TypeTag>
177concept CCMpfaModel = std::is_same_v<
178 typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod,
179 DiscretizationMethods::CCMpfa
180>;
181
182template<CCMpfaModel TypeTag>
184{
186};
187
188} // end namespace Detail
189
190} // namespace Dumux
191
192#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
The element-wise residual for control-volume finite element schemes.
Definition: cvfelocalresidual.hh:60
Class for the interaction volume data handle.
Definition: interactionvolumedatahandle.hh:226
Defines all properties used in Dumux.
Type traits for problem classes.
Definition: ccmpfa.hh:177
The default local operator than can be specialized for each discretization scheme.
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 discretization methods in Dumux.
The available mpfa schemes in Dumux.
Definition: adapt.hh:17
typename Detail::DiscretizationDefaultLocalOperator< TypeTag >::type DiscretizationDefaultLocalOperator
Definition: defaultlocaloperator.hh:27
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:173
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:52
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: ccmpfa.hh:52