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#include <utility>
19
23#include <dumux/common/typetraits/boundary_.hh>
24
25#include <dumux/assembly/cvfelocalresidual_.hh>
26
31
36
40
41
42namespace Dumux::Properties {
43
45// Create new type tags
46namespace TTag {
47struct PQ2Base { using InheritsFrom = std::tuple<GridProperties>; };
48struct PQ2HybridModel { using InheritsFrom = std::tuple<PQ2Base>; };
49struct PQ2FEModel { using InheritsFrom = std::tuple<PQ2Base>; };
50} // end namespace TTag
51
53template<class TypeTag>
54struct GridGeometry<TypeTag, TTag::PQ2HybridModel>
55{
56private:
57 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
60public:
62};
63
65template<class TypeTag>
66struct GridVariables<TypeTag, TTag::PQ2HybridModel>
68
70template<class TypeTag>
71struct EnableGridGeometryCache<TypeTag, TTag::PQ2HybridModel> { static constexpr bool value = false; };
72
74template<class TypeTag>
75struct EnableGridVolumeVariablesCache<TypeTag, TTag::PQ2HybridModel> { static constexpr bool value = false; };
76
78template<class TypeTag>
79struct SolutionVector<TypeTag, TTag::PQ2HybridModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
80
82template<class TypeTag>
83struct JacobianMatrix<TypeTag, TTag::PQ2HybridModel>
84{
85private:
88 using MatrixBlock = typename Dune::FieldMatrix<PrimaryVariable, numEq, numEq>;
89public:
91};
92
94template<class TypeTag>
95struct ElementBoundaryTypes<TypeTag, TTag::PQ2Base>
96{
97private:
100 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
101public:
102 // Check if problem has new boundaryTypes interface
103 // then use ElementIntersectionBoundaryTypes
104 using type = std::conditional_t<
105 Dumux::Detail::hasProblemBoundaryTypesForFaceFunction<Problem, typename GD::LocalView>(),
108 >;
109};
110
112template<class TypeTag>
113struct GridGeometry<TypeTag, TTag::PQ2FEModel>
114{
115private:
116 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
119public:
121};
122
123template<class TypeTag>
124struct GridVariables<TypeTag, TTag::PQ2FEModel>
126
128template<class TypeTag>
129struct EnableGridVolumeVariablesCache<TypeTag, TTag::PQ2FEModel> { static constexpr bool value = false; };
130
132template<class TypeTag>
133struct SolutionVector<TypeTag, TTag::PQ2FEModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
134
136template<class TypeTag>
137struct JacobianMatrix<TypeTag, TTag::PQ2FEModel>
138{
139private:
142 using MatrixBlock = typename Dune::FieldMatrix<PrimaryVariable, numEq, numEq>;
143public:
145};
146
147} // namespace Dumux::Properties
148
149namespace Dumux::Detail {
150
151template<class Problem>
153{
154private:
155 using GD = std::decay_t<decltype(std::declval<Problem>().gridDiscretization())>;
156public:
158 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, boundaryFace)
159 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GD::LocalView>::type;
160};
161
162template<class TypeTag>
163concept PQ2Model = std::is_same_v<
166>;
167
168template<class T>
170
171template<PQ2HybridModel TypeTag>
173{ using type = Dumux::Experimental::CVFELocalResidual<TypeTag>; };
174
175template<class T>
177
178template<PQ2FEModel TypeTag>
181
182} // end namespace Dumux::Detail
183
184#endif
The element-wise residual for grid-based discretization schemes.
Boundary flag to store e.g. in sub control volume faces.
This class stores an array of BoundaryTypes objects.
Definition cvfe/elementboundarytypes.hh:29
This class stores an array of BoundaryTypes objects. This class is not dependent on the used discreti...
Definition elementboundarytypes.hh:30
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:140
Definition matrix.hh:20
Defines all properties used in Dumux.
Type traits for problem classes.
Definition pq2.hh:176
Definition pq2.hh:169
Definition pq2.hh:163
Boundary types gathered on an element.
The local element solution class for control-volume finite element methods.
Grid variables with the variables cache selected depending on the element discretization.
The default local operator than can be specialized for each discretization scheme.
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.
Declares properties required for finite-volume models models.
GridVariables< GetPropType< TypeTag, Properties::GridGeometry >, DefaultGridVariablesCache< GetPropType< TypeTag, Properties::GridGeometry >, GetPropType< TypeTag, Properties::Problem >, Variables, getPropValue< TypeTag, Properties::EnableGridVolumeVariablesCache >() > > DefaultGridVariables
The grid variables of a model whose variables are defined per local degree of freedom.
Definition defaultgridvariables.hh:82
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
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 GD::LocalView >::type BoundaryTypes
Definition pq2.hh:159
Definition common/typetraits/problem.hh:23
Detail::ProblemGridGeometry< Problem > GridDiscretization
Definition common/typetraits/problem.hh:51
typename Detail::template ProblemTraits< Problem, typename GridGeometry::DiscretizationMethod >::BoundaryTypes BoundaryTypes
Definition common/typetraits/problem.hh:52
std::conditional_t< Dumux::Detail::hasProblemBoundaryTypesForFaceFunction< Problem, typename GD::LocalView >(), Dumux::ElementIntersectionBoundaryTypes< BoundaryTypes >, Dumux::CVFEElementBoundaryTypes< BoundaryTypes > > type
Definition pq2.hh:104
Dumux::Experimental::PQ2FEGridDiscretization< Scalar, GridView, enableCache > type
Definition pq2.hh:120
PQ2FVGridGeometry< Scalar, GridView, enableCache > type
Definition pq2.hh:61
Dumux::Experimental::DefaultGridVariables< TypeTag > type
Definition pq2.hh:125
Dumux::Experimental::DefaultGridVariables< TypeTag > type
Definition pq2.hh:67
typename Dune::BCRSMatrix< MatrixBlock > type
Definition pq2.hh:144
typename Dune::BCRSMatrix< MatrixBlock > type
Definition pq2.hh:90
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition pq2.hh:133
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition pq2.hh:79
std::tuple< GridProperties > InheritsFrom
Definition pq2.hh:47
std::tuple< PQ2Base > InheritsFrom
Definition pq2.hh:49
std::tuple< PQ2Base > InheritsFrom
Definition pq2.hh:48