version 3.11-dev
pq1bubble.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_DISCRETIZTAION_PQ1BUBBLE_HH
14#define DUMUX_DISCRETIZTAION_PQ1BUBBLE_HH
15
16#include <concepts>
17#include <type_traits>
18
19#include <dune/common/fvector.hh>
20#include <dune/geometry/multilineargeometry.hh>
21
25#include <dumux/common/typetraits/boundary_.hh>
26
28
33
43
45
46namespace Dumux::Properties {
47
49// Create new type tags
50namespace TTag {
51struct PQ1BubbleBase { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
52struct PQ1BubbleModel { using InheritsFrom = std::tuple<PQ1BubbleBase>; };
53struct PQ1BubbleHybridModel { using InheritsFrom = std::tuple<PQ1BubbleBase>; };
54} // end namespace TTag
55
57template<class TypeTag>
58struct GridGeometry<TypeTag, TTag::PQ1BubbleModel>
59{
60private:
61 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
64public:
66};
67
69template<class TypeTag>
70struct GridGeometry<TypeTag, TTag::PQ1BubbleHybridModel>
71{
72private:
73 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
77 // For hybrid scheme we use two bubble functions on cubes
78 // when only using one bubble function stability issues can arise, especially for coupled problems
79 static constexpr std::size_t numCubeBubbles = 2;
81public:
83};
84
86template<class TypeTag>
87struct GridVolumeVariables<TypeTag, TTag::PQ1BubbleBase>
88{
89private:
90 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
94public:
96};
97
99template<class TypeTag>
100struct FluxVariablesCache<TypeTag, TTag::PQ1BubbleModel>
101{
102private:
105public:
107};
108
110template<class TypeTag>
111struct GridFluxVariablesCache<TypeTag, TTag::PQ1BubbleModel>
112{
113private:
114 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
116
118 using FluxVariablesCache = GetPropTypeOr<TypeTag,
119 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
120 >;
121public:
123};
124
126template<class TypeTag>
127struct FluxVariablesCache<TypeTag, TTag::PQ1BubbleHybridModel>
128{
129private:
132public:
134};
135
137template<class TypeTag>
138struct GridFluxVariablesCache<TypeTag, TTag::PQ1BubbleHybridModel>
139{
140private:
141 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
143
145 using FluxVariablesCache = GetPropTypeOr<TypeTag,
146 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
147 >;
148public:
150};
151
153template<class TypeTag>
154struct ElementBoundaryTypes<TypeTag, TTag::PQ1BubbleBase>
155{
156private:
158 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
159 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
160public:
161 // Check if problem has new boundaryTypes interface
162 // then use ElementIntersectionBoundaryTypes
163 using type = std::conditional_t<
164 Dumux::Detail::hasProblemBoundaryTypesForIntersectionFunction<Problem, typename GG::LocalView, typename GG::GridView::Intersection>(),
167 >;
168};
169
170} // namespace Dumux::Properties
171
172namespace Dumux::Detail {
173
174template<class Problem>
175struct ProblemTraits<Problem, DiscretizationMethods::PQ1Bubble>
176{
177private:
178 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
179public:
180 using GridGeometry = GG;
181 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, intersection)
182 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView, typename GG::GridView::Intersection>::type;
183};
184
185template<class TypeTag>
186concept PQ1BubbleModel = std::is_same_v<
187 typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod,
189>;
190
191template<PQ1BubbleModel TypeTag>
193{
195};
196
197} // end namespace Dumux::Detail
198
199#endif
Boundary flag to store e.g. in sub control volume faces.
This class stores an array of BoundaryTypes objects.
Definition: cvfe/elementboundarytypes.hh:28
Flux variables cache class for control-volume finite element schemes. For control-volume finite eleme...
Definition: discretization/cvfe/fluxvariablescache.hh:34
Flux variable caches implementation on a gridview.
Definition: discretization/cvfe/gridfluxvariablescache.hh:48
The element-wise residual for control-volume finite element schemes.
Definition: cvfelocalresidual.hh:77
Base class for the grid local variables.
Definition: gridvariablescache.hh:44
A class for providing the new update interface of variables. This allows to still use the VolumesVari...
Definition: variablesadapter.hh:36
This class stores an array of BoundaryTypes objects. This class is not dependent on the used discreti...
Definition: elementboundarytypes.hh:30
Flux variables cache class for control-volume finite element schemes. For control-volume finite eleme...
Definition: discretization/cvfe/hybrid/fluxvariablescache.hh:32
Flux variable caches implementation on a gridview.
Definition: discretization/cvfe/hybrid/gridfluxvariablescache.hh:51
Base class for the finite volume geometry vector for pq1bubble schemes This builds up the sub control...
Definition: discretization/pq1bubble/fvgridgeometry.hh:142
Defines all properties used in Dumux.
Type traits for problem classes.
Definition: pq1bubble.hh:186
Boundary types gathered on an element.
The local element solution class for control-volume finite element methods.
Calculates the element-wise residual for control-volume finite element schemes.
The default local operator than can be specialized for each discretization scheme.
Flux variables cache class for control-volume finite element schemes.
Global flux variable cache.
Flux variables cache class for control-volume finite element schemes.
Global flux variable cache.
Base class for the finite volume geometry vector for the pq1bubble method This builds up the sub cont...
Boundary types gathered on an element.
Classes related to flux variables caching.
Declares properties required for finite-volume models models.
The grid local variables class for control-volume finite element methods.
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
The available discretization methods in Dumux.
Definition: cvfelocalresidual.hh:30
CVFE< CVFEMethods::PQ1Bubble > PQ1Bubble
Definition: method.hh:112
The energy balance equation for a porous solid.
Definition: common/properties.hh:26
typename Detail::DiscretizationDefaultLocalOperator< TypeTag >::type DiscretizationDefaultLocalOperator
Definition: defaultlocaloperator.hh:27
Quadrature rule traits for discretization schemes.
Definition: quadraturerules.hh:84
Detail::BoundaryTypes< Problem, typename GG::LocalView, typename GG::GridView::Intersection >::type BoundaryTypes
Definition: pq1bubble.hh:182
Definition: common/typetraits/problem.hh:23
An empty flux variables cache.
Definition: fluxvariablescaching.hh:35
The default traits for the hybrid pq1bubble finite volume grid geometry Defines the scv and scvf type...
Definition: discretization/pq1bubble/fvgridgeometry.hh:128
typename Detail::template ProblemTraits< Problem, typename GridGeometry::DiscretizationMethod >::BoundaryTypes BoundaryTypes
Definition: common/typetraits/problem.hh:34
std::conditional_t< Dumux::Detail::hasProblemBoundaryTypesForIntersectionFunction< Problem, typename GG::LocalView, typename GG::GridView::Intersection >(), Dumux::ElementIntersectionBoundaryTypes< BoundaryTypes >, Dumux::CVFEElementBoundaryTypes< BoundaryTypes > > type
Definition: pq1bubble.hh:167
Definition: pq1bubble.hh:51
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: pq1bubble.hh:51
std::tuple< PQ1BubbleBase > InheritsFrom
Definition: pq1bubble.hh:53
Definition: pq1bubble.hh:52
std::tuple< PQ1BubbleBase > InheritsFrom
Definition: pq1bubble.hh:52