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
21#include <dumux/common/concepts/variables_.hh>
23#include <dumux/common/typetraits/boundary_.hh>
24
26#include <dumux/assembly/cvfelocalresidual_.hh>
27
32
41
47
49
50namespace Dumux::Properties {
51
53// Create new type tags
54namespace TTag {
55struct PQ2Base { using InheritsFrom = std::tuple<GridProperties>; };
56struct PQ2HybridModel { using InheritsFrom = std::tuple<FiniteVolumeModel, PQ2Base>; };
57struct PQ2FEModel { using InheritsFrom = std::tuple<PQ2Base>; };
58} // end namespace TTag
59
61template<class TypeTag>
62struct GridGeometry<TypeTag, TTag::PQ2HybridModel>
63{
64private:
65 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
68public:
70};
71
73template<class TypeTag>
84
86template<class TypeTag>
87struct FluxVariablesCache<TypeTag, TTag::PQ2HybridModel>
88{
89private:
92public:
94};
95
97template<class TypeTag>
98struct GridFluxVariablesCache<TypeTag, TTag::PQ2HybridModel>
99{
100private:
101 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
103
105 using FluxVariablesCache = GetPropTypeOr<TypeTag,
106 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
107 >;
108public:
110};
111
113template<class TypeTag>
114struct ElementBoundaryTypes<TypeTag, TTag::PQ2Base>
115{
116private:
118 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
119 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
120public:
121 // Check if problem has new boundaryTypes interface
122 // then use ElementIntersectionBoundaryTypes
123 using type = std::conditional_t<
124 Dumux::Detail::hasProblemBoundaryTypesForFaceFunction<Problem, typename GG::LocalView>(),
127 >;
128};
129
131template<class TypeTag>
132struct GridGeometry<TypeTag, TTag::PQ2FEModel>
133{
134private:
135 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
138public:
140};
141
142template<class TypeTag>
156
158template<class TypeTag>
159struct EnableGridVolumeVariablesCache<TypeTag, TTag::PQ2FEModel> { static constexpr bool value = false; };
160
162template<class TypeTag>
163struct SolutionVector<TypeTag, TTag::PQ2FEModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
164
166template<class TypeTag>
167struct JacobianMatrix<TypeTag, TTag::PQ2FEModel>
168{
169private:
172 using MatrixBlock = typename Dune::FieldMatrix<Scalar, numEq, numEq>;
173public:
175};
176
177} // namespace Dumux::Properties
178
179namespace Dumux::Detail {
180
181template<class Problem>
183{
184private:
185 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
186public:
187 using GridGeometry = GG;
188 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, boundaryFace)
189 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView>::type;
190};
191
192template<class TypeTag>
193concept PQ2Model = std::is_same_v<
196>;
197
198template<class T>
200
201template<PQ2HybridModel TypeTag>
203{
204private:
206 static constexpr bool usesGeneralGridVariables =
207 Dumux::Concept::GridVariables<GV> && !Dumux::Concept::FVGridVariables<GV>;
208public:
209 using type = std::conditional_t<usesGeneralGridVariables,
210 Dumux::Experimental::CVFELocalResidual<TypeTag>,
212};
213
214template<class T>
216
217template<PQ2FEModel TypeTag>
220
221} // end namespace Dumux::Detail
222
223#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:28
The element-wise residual for control-volume finite element schemes.
Definition cvfelocalresidual.hh:60
Base class for the grid local variables.
Definition cvfe/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 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
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 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:215
Definition pq2.hh:199
Definition pq2.hh:193
Boundary types gathered on an element.
The local element solution class for control-volume finite element methods.
The grid local variables class for control-volume finite element methods.
Classes representing interpolation point data for control-volume finite element schemes.
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.
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.
Classes related to flux variables caching.
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
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
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.
Definition cvfe/gridvariablescache.hh:31
CCLocalResidual< TypeTag > type
Definition ccmpfa.hh:185
Definition defaultlocaloperator.hh:19
Detail::BoundaryTypes< Problem, typename GG::LocalView >::type BoundaryTypes
Definition pq2.hh:189
Definition common/typetraits/problem.hh:23
Definition fem/gridvariablescache.hh:36
An empty flux variables cache.
Definition fluxvariablescaching.hh:35
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:123
HybridCVFEFluxVariablesCache< Scalar, GridGeometry > type
Definition pq2.hh:93
HybridCVFEGridFluxVariablesCache< Problem, FluxVariablesCache, enableCache > type
Definition pq2.hh:109
Dumux::Experimental::PQ2FEGridDiscretization< Scalar, GridView, enableCache > type
Definition pq2.hh:139
PQ2FVGridGeometry< Scalar, GridView, enableCache > type
Definition pq2.hh:69
Dumux::Experimental::GridVariables< GG, GVC > type
Definition pq2.hh:154
Dumux::Detail::CVFE::CVFEGridVariablesCache< Traits, enableCache > type
Definition pq2.hh:82
typename Dune::BCRSMatrix< MatrixBlock > type
Definition pq2.hh:174
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition pq2.hh:163
std::tuple< GridProperties > InheritsFrom
Definition pq2.hh:55
std::tuple< PQ2Base > InheritsFrom
Definition pq2.hh:57
std::tuple< FiniteVolumeModel, PQ2Base > InheritsFrom
Definition pq2.hh:56