version 3.11-dev
Loading...
Searching...
No Matches
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//
12
13#ifndef DUMUX_DISCRETIZATION_PQ1BUBBLE_HH
14#define DUMUX_DISCRETIZATION_PQ1BUBBLE_HH
15
16#include <concepts>
17#include <type_traits>
18
21#include <dumux/common/concepts/variables_.hh>
23#include <dumux/common/typetraits/boundary_.hh>
24
26#include <dumux/assembly/cvfelocalresidual_.hh>
27
32
43
49
51
52namespace Dumux::Properties {
53
55// Create new type tags
56namespace TTag {
57struct PQ1BubbleBase { using InheritsFrom = std::tuple<GridProperties>; };
58struct PQ1BubbleFVBase { using InheritsFrom = std::tuple<FiniteVolumeModel,PQ1BubbleBase>; };
59struct PQ1BubbleModel { using InheritsFrom = std::tuple<PQ1BubbleFVBase>; };
60struct PQ1BubbleHybridModel { using InheritsFrom = std::tuple<PQ1BubbleFVBase>; };
61struct PQ1BubbleFEModel { using InheritsFrom = std::tuple<PQ1BubbleBase>; };
62} // end namespace TTag
63
65template<class TypeTag>
66struct GridGeometry<TypeTag, TTag::PQ1BubbleModel>
67{
68private:
69 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
72public:
74};
75
77template<class TypeTag>
78struct GridGeometry<TypeTag, TTag::PQ1BubbleHybridModel>
79{
80private:
81 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
84 using QuadTraits = PQ1BubbleQuadratureTraits<GridView>;
85 // For hybrid scheme we use two bubble functions on cubes
86 // when only using one bubble function stability issues can arise, especially for coupled problems
87 static constexpr std::size_t numCubeBubbles = 2;
89public:
91};
92
94template<class TypeTag>
95struct GridGeometry<TypeTag, TTag::PQ1BubbleFEModel>
96{
97private:
98 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
101public:
103};
104
105template<class TypeTag>
106struct GridVariables<TypeTag, TTag::PQ1BubbleFEModel>
107{
108private:
110 // ToDo: Do not determine enableCache by EnableGridVolumeVariablesCache
111 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
117public:
119};
120
122template<class TypeTag>
123struct EnableGridVolumeVariablesCache<TypeTag, TTag::PQ1BubbleFEModel> { static constexpr bool value = false; };
124
126template<class TypeTag>
127struct SolutionVector<TypeTag, TTag::PQ1BubbleFEModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
128
130template<class TypeTag>
131struct JacobianMatrix<TypeTag, TTag::PQ1BubbleFEModel>
132{
133private:
136 using MatrixBlock = typename Dune::FieldMatrix<Scalar, numEq, numEq>;
137public:
139};
140
142template<class TypeTag>
153
155template<class TypeTag>
156struct FluxVariablesCache<TypeTag, TTag::PQ1BubbleModel>
157{
158private:
161public:
163};
164
166template<class TypeTag>
167struct GridFluxVariablesCache<TypeTag, TTag::PQ1BubbleModel>
168{
169private:
170 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
172
174 using FluxVariablesCache = GetPropTypeOr<TypeTag,
175 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
176 >;
177public:
179};
180
182template<class TypeTag>
183struct FluxVariablesCache<TypeTag, TTag::PQ1BubbleHybridModel>
184{
185private:
188public:
190};
191
193template<class TypeTag>
194struct GridFluxVariablesCache<TypeTag, TTag::PQ1BubbleHybridModel>
195{
196private:
197 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
199
201 using FluxVariablesCache = GetPropTypeOr<TypeTag,
202 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
203 >;
204public:
206};
207
209template<class TypeTag>
210struct ElementBoundaryTypes<TypeTag, TTag::PQ1BubbleBase>
211{
212private:
214 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
215 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
216public:
217 // Check if problem has new boundaryTypes interface
218 // then use ElementIntersectionBoundaryTypes
219 using type = std::conditional_t<
220 Dumux::Detail::hasProblemBoundaryTypesForFaceFunction<Problem, typename GG::LocalView>(),
223 >;
224};
225
226} // namespace Dumux::Properties
227
228namespace Dumux::Detail {
229
230template<class Problem>
232{
233private:
234 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
235public:
236 using GridGeometry = GG;
237 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, boundaryFace)
238 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView>::type;
239};
240
241template<class TypeTag>
242concept PQ1BubbleModel = std::is_same_v<
245>;
246
247template<class T>
249
250template<PQ1BubbleFVModel TypeTag>
252{
253private:
255 static constexpr bool usesGeneralGridVariables =
256 Dumux::Concept::GridVariables<GV> && !Dumux::Concept::FVGridVariables<GV>;
257public:
258 using type = std::conditional_t<usesGeneralGridVariables,
259 Dumux::Experimental::CVFELocalResidual<TypeTag>,
261};
262
263template<class T>
265
266template<PQ1BubbleFEModel TypeTag>
269
270} // end namespace Dumux::Detail
271
272#endif
The element-wise residual for grid-based discretization schemes.
Boundary flag to store e.g. in sub control volume faces.
Interpolation point data related to a local basis.
Definition cvfe/interpolationpointdata.hh:161
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
The element-wise residual for control-volume finite element schemes.
Definition cvfelocalresidual.hh:60
Base class for the grid local variables.
Definition cvfe/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
Base class for the grid local variables.
Definition fem/gridvariablescache.hh:50
The grid variables class for general schemes, storing variables and data.
Definition discretization/gridvariables.hh:27
The element-wise residual for grid-based discretization schemes.
Definition assembly/localresidual.hh:39
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:145
Definition matrix.hh:20
Defines all properties used in Dumux.
Type traits for problem classes.
Definition pq1bubble.hh:264
Definition pq1bubble.hh:248
Definition pq1bubble.hh:242
Boundary types gathered on an element.
The local element solution class for control-volume finite element methods.
The grid local variables class for control-volume finite element methods.
Classes representing interpolation point data for control-volume finite element schemes.
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.
The grid variables class for general schemes, storing variables and data.
Base class for the finite volume geometry vector for the pq1bubble method This builds up the sub cont...
Boundary types gathered on an element.
The element variables class.
The grid local variables class for finite element methods.
Classes related to flux variables caching.
Declares properties required for finite-volume models models.
CVFEGridFluxVariablesCacheImpl< Problem, FluxVariablesCache, cachingEnabled, Traits, Detail::ScvfQuadratureRuleOrDefault_t< typename Traits::FluxVariablesCache > > CVFEGridFluxVariablesCache
Flux variable caches on a gridview.
Definition discretization/cvfe/gridfluxvariablescache.hh:58
CVFE::DefaultQuadratureTraits< GridView, ScvRule, ScvfRule, ElementRule, IntersectionRule, BoundaryFaceRule > PQ1BubbleQuadratureTraits
Quadrature rule traits for PQ1Bubble discretization.
Definition discretization/pq1bubble/fvgridgeometry.hh:100
FEGridDiscretization< GV, Traits > PQ1BubbleFEGridDiscretization
Finite element grid discretization for the PQ1Bubble method.
Definition pq1bubble/fegriddiscretization.hh:74
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:310
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
constexpr bool inheritsFrom()
Return true if the given type tag inherits from the given parent type tag.
Definition propertysystem.hh:262
The available discretization methods in Dumux.
Definition discretization/pq1bubble/geometryhelper.hh:53
Definition cvfelocalresidual.hh:25
Definition method.hh:20
CVFE< CVFEMethods::PQ1Bubble > PQ1Bubble
Definition method.hh:126
Type tag for numeric models.
Definition grid.hh:24
The energy balance equation for a porous solid.
Definition common/properties.hh:26
Finite element grid discretization for the PQ1Bubble method.
Definition cvfe/gridvariablescache.hh:31
CCLocalResidual< TypeTag > type
Definition ccmpfa.hh:185
Definition defaultlocaloperator.hh:19
Detail::BoundaryTypes< Problem, typename GG::LocalView >::type BoundaryTypes
Definition pq1bubble.hh:238
Definition common/typetraits/problem.hh:23
Definition fem/gridvariablescache.hh:36
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:131
typename Detail::template ProblemTraits< Problem, typename GridGeometry::DiscretizationMethod >::BoundaryTypes BoundaryTypes
Definition common/typetraits/problem.hh:51
std::conditional_t< Dumux::Detail::hasProblemBoundaryTypesForFaceFunction< Problem, typename GG::LocalView >(), Dumux::ElementIntersectionBoundaryTypes< BoundaryTypes >, Dumux::CVFEElementBoundaryTypes< BoundaryTypes > > type
Definition pq1bubble.hh:219
HybridCVFEFluxVariablesCache< Scalar, GridGeometry > type
Definition pq1bubble.hh:189
CVFEFluxVariablesCache< Scalar, GridGeometry > type
Definition pq1bubble.hh:162
HybridCVFEGridFluxVariablesCache< Problem, FluxVariablesCache, enableCache > type
Definition pq1bubble.hh:205
CVFEGridFluxVariablesCache< Problem, FluxVariablesCache, enableCache > type
Definition pq1bubble.hh:178
Dumux::Experimental::PQ1BubbleFEGridDiscretization< Scalar, GridView, enableCache > type
Definition pq1bubble.hh:102
PQ1BubbleFVGridGeometry< Scalar, GridView, enableCache, Traits > type
Definition pq1bubble.hh:90
PQ1BubbleFVGridGeometry< Scalar, GridView, enableCache > type
Definition pq1bubble.hh:73
Dumux::Experimental::GridVariables< GG, GVC > type
Definition pq1bubble.hh:118
Dumux::Detail::CVFE::CVFEGridVariablesCache< Traits, enableCache > type
Definition pq1bubble.hh:151
typename Dune::BCRSMatrix< MatrixBlock > type
Definition pq1bubble.hh:138
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition pq1bubble.hh:127
Definition pq1bubble.hh:57
std::tuple< GridProperties > InheritsFrom
Definition pq1bubble.hh:57
std::tuple< PQ1BubbleBase > InheritsFrom
Definition pq1bubble.hh:61
std::tuple< FiniteVolumeModel, PQ1BubbleBase > InheritsFrom
Definition pq1bubble.hh:58
std::tuple< PQ1BubbleFVBase > InheritsFrom
Definition pq1bubble.hh:60
Definition pq1bubble.hh:59
std::tuple< PQ1BubbleFVBase > InheritsFrom
Definition pq1bubble.hh:59