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
41
43
44namespace Dumux::Properties {
45
47// Create new type tags
48namespace TTag {
49struct PQ1BubbleBase { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
50struct PQ1BubbleModel { using InheritsFrom = std::tuple<PQ1BubbleBase>; };
51struct PQ1BubbleHybridModel { using InheritsFrom = std::tuple<PQ1BubbleBase>; };
52} // end namespace TTag
53
55template<class TypeTag>
56struct GridGeometry<TypeTag, TTag::PQ1BubbleModel>
57{
58private:
59 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
62public:
64};
65
67template<class TypeTag>
68struct GridGeometry<TypeTag, TTag::PQ1BubbleHybridModel>
69{
70private:
71 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
75public:
77};
78
80template<class TypeTag>
81struct GridVolumeVariables<TypeTag, TTag::PQ1BubbleBase>
82{
83private:
84 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
88public:
90};
91
93template<class TypeTag>
94struct FluxVariablesCache<TypeTag, TTag::PQ1BubbleBase>
95{
96private:
99public:
101};
102
104template<class TypeTag>
105struct GridFluxVariablesCache<TypeTag, TTag::PQ1BubbleBase>
106{
107private:
108 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
110
112 using FluxVariablesCache = GetPropTypeOr<TypeTag,
113 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
114 >;
115public:
117};
118
120template<class TypeTag>
121struct ElementBoundaryTypes<TypeTag, TTag::PQ1BubbleBase>
122{
123private:
125 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
126 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
127public:
128 // Check if problem has new boundaryTypes interface
129 // then use ElementIntersectionBoundaryTypes
130 using type = std::conditional_t<
131 Dumux::Detail::hasProblemBoundaryTypesForIntersectionFunction<Problem, typename GG::LocalView, typename GG::GridView::Intersection>(),
134 >;
135};
136
137} // namespace Dumux::Properties
138
139namespace Dumux::Detail {
140
141template<class Problem>
142struct ProblemTraits<Problem, DiscretizationMethods::PQ1Bubble>
143{
144private:
145 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
146public:
147 using GridGeometry = GG;
148 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, intersection)
149 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView, typename GG::GridView::Intersection>::type;
150};
151
152template<class TypeTag>
153concept PQ1BubbleModel = std::is_same_v<
154 typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod,
156>;
157
158template<PQ1BubbleModel TypeTag>
160{
162};
163
164} // end namespace Dumux::Detail
165
166#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:30
Flux variable caches on a gridview.
Definition: discretization/cvfe/gridfluxvariablescache.hh:46
The element-wise residual for control-volume finite element schemes.
Definition: cvfelocalresidual.hh:63
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
Base class for the finite volume geometry vector for pq1bubble schemes This builds up the sub control...
Definition: discretization/pq1bubble/fvgridgeometry.hh:122
Defines all properties used in Dumux.
Type traits for problem classes.
Definition: pq1bubble.hh:153
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.
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:28
CVFE< CVFEMethods::PQ1Bubble > PQ1Bubble
Definition: method.hh:108
The energy balance equation for a porous solid.
Definition: common/properties.hh:26
typename Detail::DiscretizationDefaultLocalOperator< TypeTag >::type DiscretizationDefaultLocalOperator
Definition: defaultlocaloperator.hh:27
Detail::BoundaryTypes< Problem, typename GG::LocalView, typename GG::GridView::Intersection >::type BoundaryTypes
Definition: pq1bubble.hh:149
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:108
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:134
Definition: pq1bubble.hh:49
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: pq1bubble.hh:49
std::tuple< PQ1BubbleBase > InheritsFrom
Definition: pq1bubble.hh:51
Definition: pq1bubble.hh:50
std::tuple< PQ1BubbleBase > InheritsFrom
Definition: pq1bubble.hh:50