version 3.8
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-FileCopyrightInfo: 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 <type_traits>
17
18#include <dune/common/fvector.hh>
19#include <dune/geometry/multilineargeometry.hh>
20
24
26
30
37
39
40namespace Dumux::Properties {
41
43// Create new type tags
44namespace TTag {
45struct PQ1BubbleModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
46} // end namespace TTag
47
49template<class TypeTag>
50struct GridGeometry<TypeTag, TTag::PQ1BubbleModel>
51{
52private:
53 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
56public:
58};
59
61template<class TypeTag>
62struct GridVolumeVariables<TypeTag, TTag::PQ1BubbleModel>
63{
64private:
65 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
69public:
71};
72
74template<class TypeTag>
75struct FluxVariablesCache<TypeTag, TTag::PQ1BubbleModel>
76{
77private:
80public:
82};
83
85template<class TypeTag>
86struct GridFluxVariablesCache<TypeTag, TTag::PQ1BubbleModel>
87{
88private:
89 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
91
93 using FluxVariablesCache = GetPropTypeOr<TypeTag,
94 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
95 >;
96public:
98};
99
101template<class TypeTag>
102struct ElementBoundaryTypes<TypeTag, TTag::PQ1BubbleModel>
103{
104private:
106 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
107public:
109};
110
112template<class TypeTag>
113struct BaseLocalResidual<TypeTag, TTag::PQ1BubbleModel>
115
116} // namespace Dumux::Properties
117
118namespace Dumux::Detail {
119
120template<class Problem>
121struct ProblemTraits<Problem, DiscretizationMethods::PQ1Bubble>
122{
123private:
124 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
125 using Element = typename GG::GridView::template Codim<0>::Entity;
126 using SubControlVolume = typename GG::SubControlVolume;
127public:
128 using GridGeometry = GG;
129 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scv)
130 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolume>()))>;
131};
132
133template<class GridView>
134struct LocalDofTraits<GridView, DiscretizationMethods::PQ1Bubble>
135{
136 static constexpr int dim = GridView::dimension;
137 // Dofs are located at the vertices and element
138 static constexpr int numCubeElementDofs = (1<<dim) + 1;
139};
140
141} // end namespace Dumux::Detail
142
143#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:27
Flux variable caches on a gridview.
Definition: discretization/cvfe/gridfluxvariablescache.hh:46
Base class for the grid volume variables.
Definition: cvfe/gridvolumevariables.hh:42
The element-wise residual for control-volume finite element schemes.
Definition: cvfelocalresidual.hh:60
Base class for the finite volume geometry vector for pq1bubble schemes This builds up the sub control...
Definition: discretization/pq1bubble/fvgridgeometry.hh:95
Defines all properties used in Dumux.
Type traits for problem classes.
Boundary types gathered on an element.
The local element solution class for control-volume finite element methods.
The grid volume variables class for control-volume finite element methods.
Calculates the element-wise residual for control-volume finite element schemes.
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...
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
Element-specific traits of grid geometries / discretization schemes.
The available discretization methods in Dumux.
Distance implementation details.
Definition: cvfelocalresidual.hh:25
CVFE< CVFEMethods::PQ1Bubble > PQ1Bubble
Definition: method.hh:108
The energy balance equation for a porous solid.
Definition: common/properties.hh:26
Definition: cvfe/gridvolumevariables.hh:29
Definition: localdoftraits.hh:18
std::decay_t< decltype(std::declval< Problem >().boundaryTypes(std::declval< Element >(), std::declval< SubControlVolume >()))> BoundaryTypes
Definition: pq1bubble.hh:130
Definition: common/typetraits/problem.hh:23
An empty flux variables cache.
Definition: fluxvariablescaching.hh:35
typename Detail::template ProblemTraits< Problem, typename GridGeometry::DiscretizationMethod >::BoundaryTypes BoundaryTypes
Definition: common/typetraits/problem.hh:34
Definition: pq1bubble.hh:45
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: pq1bubble.hh:45