version 3.11-dev
Loading...
Searching...
No Matches
pq2.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_PQ2_HH
14#define DUMUX_DISCRETIZATION_PQ2_HH
15
16#include <concepts>
17#include <type_traits>
18
22#include <dumux/common/typetraits/boundary_.hh>
23
24#include <dumux/assembly/cvfelocalresidual_.hh>
25
30
37
43
44
45namespace Dumux::Properties {
46
48// Create new type tags
49namespace TTag {
50struct PQ2Base { using InheritsFrom = std::tuple<GridProperties>; };
51struct PQ2HybridModel { using InheritsFrom = std::tuple<PQ2Base>; };
52struct PQ2FEModel { using InheritsFrom = std::tuple<PQ2Base>; };
53} // end namespace TTag
54
56template<class TypeTag>
57struct GridGeometry<TypeTag, TTag::PQ2HybridModel>
58{
59private:
60 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
63public:
65};
66
68template<class TypeTag>
83
85template<class TypeTag>
86struct EnableGridGeometryCache<TypeTag, TTag::PQ2HybridModel> { static constexpr bool value = false; };
87
89template<class TypeTag>
90struct EnableGridVolumeVariablesCache<TypeTag, TTag::PQ2HybridModel> { static constexpr bool value = false; };
91
93template<class TypeTag>
94struct SolutionVector<TypeTag, TTag::PQ2HybridModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
95
97template<class TypeTag>
98struct JacobianMatrix<TypeTag, TTag::PQ2HybridModel>
99{
100private:
103 using MatrixBlock = typename Dune::FieldMatrix<Scalar, numEq, numEq>;
104public:
106};
107
109template<class TypeTag>
110struct ElementBoundaryTypes<TypeTag, TTag::PQ2Base>
111{
112private:
114 using GG = typename ProblemTraits<Problem>::GridGeometry;
115 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
116public:
117 // Check if problem has new boundaryTypes interface
118 // then use ElementIntersectionBoundaryTypes
119 using type = std::conditional_t<
120 Dumux::Detail::hasProblemBoundaryTypesForFaceFunction<Problem, typename GG::LocalView>(),
123 >;
124};
125
127template<class TypeTag>
128struct GridGeometry<TypeTag, TTag::PQ2FEModel>
129{
130private:
131 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
134public:
136};
137
138template<class TypeTag>
152
154template<class TypeTag>
155struct EnableGridVolumeVariablesCache<TypeTag, TTag::PQ2FEModel> { static constexpr bool value = false; };
156
158template<class TypeTag>
159struct SolutionVector<TypeTag, TTag::PQ2FEModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
160
162template<class TypeTag>
163struct JacobianMatrix<TypeTag, TTag::PQ2FEModel>
164{
165private:
168 using MatrixBlock = typename Dune::FieldMatrix<Scalar, numEq, numEq>;
169public:
171};
172
173} // namespace Dumux::Properties
174
175namespace Dumux::Detail {
176
177template<class Problem>
179{
180private:
182public:
183 using GridGeometry = GG;
184 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, boundaryFace)
185 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView>::type;
186};
187
188template<class TypeTag>
189concept PQ2Model = std::is_same_v<
192>;
193
194template<class T>
196
197template<PQ2HybridModel TypeTag>
199{ using type = Dumux::Experimental::CVFELocalResidual<TypeTag>; };
200
201template<class T>
203
204template<PQ2FEModel TypeTag>
207
208} // end namespace Dumux::Detail
209
210#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:29
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
The grid variables cache class for hybrid control-volume finite element methods.
Definition cvfe/hybrid/gridvariablescache.hh:50
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
Base class for the finite volume geometry vector for pq2 schemes This builds up the sub control volum...
Definition discretization/pq2/fvgridgeometry.hh:138
Definition matrix.hh:20
Defines all properties used in Dumux.
Type traits for problem classes.
Definition pq2.hh:202
Definition pq2.hh:195
Definition pq2.hh:189
Boundary types gathered on an element.
The local element solution class for control-volume finite element methods.
The grid variables cache class for hybrid control-volume finite element methods.
Classes representing interpolation point data for control-volume finite element schemes.
The default local operator than can be specialized for each discretization scheme.
The grid variables class for general schemes, storing variables and data.
Base class for the finite volume geometry vector for the pq2 method This builds up the sub control vo...
Boundary types gathered on an element.
The element variables class.
The grid local variables class for finite element methods.
Declares properties required for finite-volume models models.
FEGridDiscretization< GV, Traits > PQ2FEGridDiscretization
Finite element grid discretization for the PQ2 method.
Definition pq2/fegriddiscretization.hh:84
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
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 cvfelocalresidual.hh:25
typename ProblemGridGeometryHelper< Problem >::type ProblemGridGeometry
Definition common/typetraits/problem.hh:40
Definition method.hh:20
CVFE< CVFEMethods::PQ2 > PQ2
Definition method.hh:132
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 PQ2 method.
CCLocalResidual< TypeTag > type
Definition ccmpfa.hh:185
Definition defaultlocaloperator.hh:19
Detail::BoundaryTypes< Problem, typename GG::LocalView >::type BoundaryTypes
Definition pq2.hh:185
Definition common/typetraits/problem.hh:23
Definition cvfe/hybrid/gridvariablescache.hh:36
Definition fem/gridvariablescache.hh:36
Detail::ProblemGridGeometry< Problem > GridGeometry
Definition common/typetraits/problem.hh:50
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 pq2.hh:119
Dumux::Experimental::PQ2FEGridDiscretization< Scalar, GridView, enableCache > type
Definition pq2.hh:135
PQ2FVGridGeometry< Scalar, GridView, enableCache > type
Definition pq2.hh:64
Dumux::Experimental::GridVariables< GG, GVC > type
Definition pq2.hh:150
Dumux::Experimental::GridVariables< GG, GVC > type
Definition pq2.hh:81
typename Dune::BCRSMatrix< MatrixBlock > type
Definition pq2.hh:170
typename Dune::BCRSMatrix< MatrixBlock > type
Definition pq2.hh:105
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition pq2.hh:159
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition pq2.hh:94
std::tuple< GridProperties > InheritsFrom
Definition pq2.hh:50
std::tuple< PQ2Base > InheritsFrom
Definition pq2.hh:52
std::tuple< PQ2Base > InheritsFrom
Definition pq2.hh:51