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
42
44
45namespace Dumux::Properties {
46
48// Create new type tags
49namespace TTag {
50struct PQ1BubbleBase { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
51struct PQ1BubbleModel { using InheritsFrom = std::tuple<PQ1BubbleBase>; };
52struct PQ1BubbleHybridModel { using InheritsFrom = std::tuple<PQ1BubbleBase>; };
53} // end namespace TTag
54
56template<class TypeTag>
57struct GridGeometry<TypeTag, TTag::PQ1BubbleModel>
58{
59private:
60 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
63public:
65};
66
68template<class TypeTag>
69struct GridGeometry<TypeTag, TTag::PQ1BubbleHybridModel>
70{
71private:
72 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
75 using QuadTraits = PQ1BubbleQuadratureTraits<GridView>;
76 // For hybrid scheme we use two bubble functions on cubes
77 // when only using one bubble function stability issues can arise, especially for coupled problems
78 static constexpr std::size_t numCubeBubbles = 2;
80public:
82};
83
85template<class TypeTag>
96
98template<class TypeTag>
99struct FluxVariablesCache<TypeTag, TTag::PQ1BubbleModel>
100{
101private:
104public:
106};
107
109template<class TypeTag>
110struct GridFluxVariablesCache<TypeTag, TTag::PQ1BubbleModel>
111{
112private:
113 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
115
117 using FluxVariablesCache = GetPropTypeOr<TypeTag,
118 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
119 >;
120public:
122};
123
125template<class TypeTag>
126struct FluxVariablesCache<TypeTag, TTag::PQ1BubbleHybridModel>
127{
128private:
131public:
133};
134
136template<class TypeTag>
137struct GridFluxVariablesCache<TypeTag, TTag::PQ1BubbleHybridModel>
138{
139private:
140 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
142
144 using FluxVariablesCache = GetPropTypeOr<TypeTag,
145 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
146 >;
147public:
149};
150
152template<class TypeTag>
153struct ElementBoundaryTypes<TypeTag, TTag::PQ1BubbleBase>
154{
155private:
157 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
158 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
159public:
160 // Check if problem has new boundaryTypes interface
161 // then use ElementIntersectionBoundaryTypes
162 using type = std::conditional_t<
163 Dumux::Detail::hasProblemBoundaryTypesForFaceFunction<Problem, typename GG::LocalView>(),
166 >;
167};
168
169} // namespace Dumux::Properties
170
171namespace Dumux::Detail {
172
173template<class Problem>
175{
176private:
177 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
178public:
179 using GridGeometry = GG;
180 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, boundaryFace)
181 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView>::type;
182};
183
184template<class TypeTag>
185concept PQ1BubbleModel = std::is_same_v<
188>;
189
190template<PQ1BubbleModel TypeTag>
192{
193private:
195 static constexpr bool usesGeneralGridVariables =
196 Dumux::Concept::GridVariables<GV> && !Dumux::Concept::FVGridVariables<GV>;
197public:
198 using type = std::conditional_t<usesGeneralGridVariables,
199 Dumux::Experimental::CVFELocalResidual<TypeTag>,
201};
202
203} // end namespace Dumux::Detail
204
205#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
The element-wise residual for control-volume finite element schemes.
Definition cvfelocalresidual.hh:60
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:145
Defines all properties used in Dumux.
Type traits for problem classes.
Definition pq1bubble.hh:185
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.
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
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
The available discretization methods in Dumux.
Definition discretization/pq1bubble/geometryhelper.hh:47
Definition cvfelocalresidual.hh:25
Definition method.hh:20
CVFE< CVFEMethods::PQ1Bubble > PQ1Bubble
Definition method.hh:116
Type tag for numeric models.
Definition grid.hh:24
The energy balance equation for a porous solid.
Definition common/properties.hh:26
std::conditional_t< usesGeneralGridVariables, Dumux::Experimental::CVFELocalResidual< TypeTag >, Dumux::CVFELocalResidual< TypeTag > > type
Definition box.hh:152
Definition defaultlocaloperator.hh:19
Detail::BoundaryTypes< Problem, typename GG::LocalView >::type BoundaryTypes
Definition pq1bubble.hh:181
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: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:162
HybridCVFEFluxVariablesCache< Scalar, GridGeometry > type
Definition pq1bubble.hh:132
CVFEFluxVariablesCache< Scalar, GridGeometry > type
Definition pq1bubble.hh:105
HybridCVFEGridFluxVariablesCache< Problem, FluxVariablesCache, enableCache > type
Definition pq1bubble.hh:148
CVFEGridFluxVariablesCache< Problem, FluxVariablesCache, enableCache > type
Definition pq1bubble.hh:121
PQ1BubbleFVGridGeometry< Scalar, GridView, enableCache, Traits > type
Definition pq1bubble.hh:81
PQ1BubbleFVGridGeometry< Scalar, GridView, enableCache > type
Definition pq1bubble.hh:64
Dumux::Detail::CVFE::CVFEGridVariablesCache< Traits, enableCache > type
Definition pq1bubble.hh:94
Definition pq1bubble.hh:50
std::tuple< FiniteVolumeModel > InheritsFrom
Definition pq1bubble.hh:50
std::tuple< PQ1BubbleBase > InheritsFrom
Definition pq1bubble.hh:52
Definition pq1bubble.hh:51
std::tuple< PQ1BubbleBase > InheritsFrom
Definition pq1bubble.hh:51