version 3.11-dev
Loading...
Searching...
No Matches
pq1nonconforming.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//
14
15#ifndef DUMUX_DISCRETIZATION_FACECENTERED_PQ1NONCONFORMING_HH
16#define DUMUX_DISCRETIZATION_FACECENTERED_PQ1NONCONFORMING_HH
17
18#include <concepts>
19#include <type_traits>
20
22#include <dumux/common/concepts/variables_.hh>
24
26#include <dumux/assembly/cvfelocalresidual_.hh>
32
34#include <dumux/common/typetraits/boundary_.hh>
35
43
47
48namespace Dumux::Properties {
49
51// Create new type tags
52namespace TTag {
53struct PQ1NonconformingBase { using InheritsFrom = std::tuple<GridProperties>; };
54struct PQ1NonconformingFVModel { using InheritsFrom = std::tuple<FiniteVolumeModel, PQ1NonconformingBase>; };
55struct PQ1NonconformingFEModel { using InheritsFrom = std::tuple<PQ1NonconformingBase>; };
56} // end namespace TTag
57
59template<class TypeTag>
60struct GridGeometry<TypeTag, TTag::PQ1NonconformingFVModel>
61{
62private:
63 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
65public:
67};
68
70template<class TypeTag>
71struct GridVolumeVariables<TypeTag, TTag::PQ1NonconformingFVModel>
72{
73private:
78public:
80};
81
83template<class TypeTag>
84struct GridFluxVariablesCache<TypeTag, TTag::PQ1NonconformingFVModel>
85{
86private:
87 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
89
91 using FluxVariablesCache = GetPropTypeOr<TypeTag,
92 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
93 >;
94public:
96};
97
99template<class TypeTag>
100struct GridVariables<TypeTag, TTag::PQ1NonconformingFVModel>
102
104template<class TypeTag>
105struct FluxVariablesCache<TypeTag, TTag::PQ1NonconformingFVModel>
106{
107private:
110public:
112};
113
115template<class TypeTag>
116struct ElementBoundaryTypes<TypeTag, TTag::PQ1NonconformingBase>
117{
118private:
120 using GG = typename ProblemTraits<Problem>::GridGeometry;
121 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
122public:
123 // Check if problem has new boundaryTypes interface
124 // then use ElementIntersectionBoundaryTypes
125 using type = std::conditional_t<
126 Dumux::Detail::hasProblemBoundaryTypesForFaceFunction<Problem, typename GG::LocalView>(),
129 >;
130};
131
133template<class TypeTag>
134struct GridGeometry<TypeTag, TTag::PQ1NonconformingFEModel>
135{
136private:
137 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
140public:
142};
143
144template<class TypeTag>
145struct GridVariables<TypeTag, TTag::PQ1NonconformingFEModel>
147
149template<class TypeTag>
150struct EnableGridVolumeVariablesCache<TypeTag, TTag::PQ1NonconformingFEModel> { static constexpr bool value = false; };
151
153template<class TypeTag>
154struct SolutionVector<TypeTag, TTag::PQ1NonconformingFEModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
155
157template<class TypeTag>
158struct JacobianMatrix<TypeTag, TTag::PQ1NonconformingFEModel>
159{
160private:
163 using MatrixBlock = typename Dune::FieldMatrix<Scalar, numEq, numEq>;
164public:
166};
167
168} // namespace Dumux::Properties
169
170namespace Dumux::Detail {
171
172template<class Problem>
173struct ProblemTraits<Problem, DiscretizationMethods::PQ1Nonconforming>
174{
175private:
177public:
178 using GridGeometry = GG;
179 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, boundaryFace)
180 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView>::type;
181};
182
183template<class TypeTag>
184concept PQ1NonconformingModel = std::is_same_v<
187>;
188template<class T>
190template<PQ1NonconformingFVModel TypeTag>
192{
193private:
195 static constexpr bool usesGeneralGridVariables =
196 Dumux::Concept::GridVariables<GV> && !Dumux::Concept::FVGridVariables<GV>;
197public:
198 using type = std::conditional_t<usesGeneralGridVariables,
199 Dumux::Experimental::CVFELocalResidual<TypeTag>,
201};
202
203template<class T>
205
206template<PQ1NonconformingFEModel TypeTag>
209
210} // end namespace Dumux::Detail
211
212#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
Flux variables cache class for control-volume finite element schemes. For control-volume finite eleme...
Definition discretization/cvfe/fluxvariablescache.hh:34
Base class for the grid volume variables.
Definition cvfe/gridvolumevariables.hh:44
The element-wise residual for control-volume finite element schemes.
Definition cvfelocalresidual.hh:60
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
Grid geometry for the diamond discretization.
Definition discretization/facecentered/diamond/fvgridgeometry.hh:85
Definition matrix.hh:20
Defines all properties used in Dumux.
Type traits for problem classes.
Definition pq1nonconforming.hh:204
Definition pq1nonconforming.hh:189
Definition pq1nonconforming.hh:184
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.
Grid variables with the variables cache selected depending on the element discretization.
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.
Grid geometry for the diamond discretization.
Boundary types gathered on an element.
The element variables class.
Classes related to flux variables caching.
Declares properties required for finite-volume models models.
CVFEGridFluxVariablesCacheImpl< Problem, FluxVariablesCache, cachingEnabled, Traits, Detail::ScvfQuadratureRuleOrDefault_t< typename Traits::FluxVariablesCache > > CVFEGridFluxVariablesCache
Flux variable caches on a gridview.
Definition discretization/cvfe/gridfluxvariablescache.hh:59
typename CVFEGridVariables< TypeTag >::type CVFEGridVariables_t
The grid variables of a control-volume finite element type tag: Experimental::DefaultGridVariables if...
Definition defaultgridvariables.hh:137
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
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
typename ProblemGridGeometryHelper< Problem >::type ProblemGridGeometry
Definition common/typetraits/problem.hh:40
Definition method.hh:20
CVFE< CVFEMethods::CR_RT > PQ1Nonconforming
Definition method.hh:114
FEGridDiscretization< GV, Traits > PQ1NonconformingFEGridDiscretization
Finite element grid discretization for the PQ1 non-conforming (face-centered) method....
Definition pq1nonconforming/fegriddiscretization.hh:90
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 PQ1 non-conforming (face-centered) method.
Definition cvfe/gridvolumevariables.hh:31
CCLocalResidual< TypeTag > type
Definition ccmpfa.hh:185
Definition defaultlocaloperator.hh:19
Detail::BoundaryTypes< Problem, typename GG::LocalView >::type BoundaryTypes
Definition pq1nonconforming.hh:180
Definition common/typetraits/problem.hh:23
An empty flux variables cache.
Definition fluxvariablescaching.hh:35
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:52
std::conditional_t< Dumux::Detail::hasProblemBoundaryTypesForFaceFunction< Problem, typename GG::LocalView >(), Dumux::ElementIntersectionBoundaryTypes< BoundaryTypes >, Dumux::CVFEElementBoundaryTypes< BoundaryTypes > > type
Definition pq1nonconforming.hh:125
CVFEFluxVariablesCache< S, GG > type
Definition pq1nonconforming.hh:111
CVFEGridFluxVariablesCache< Problem, FluxVariablesCache, enableCache > type
Definition pq1nonconforming.hh:95
Dumux::Experimental::PQ1NonconformingFEGridDiscretization< Scalar, GridView, enableCache > type
Definition pq1nonconforming.hh:141
FaceCenteredDiamondFVGridGeometry< GridView, enableCache > type
Definition pq1nonconforming.hh:66
Dumux::Experimental::DefaultGridVariables< TypeTag > type
Definition pq1nonconforming.hh:146
Dumux::Detail::CVFEGridVariables_t< TypeTag > type
Definition pq1nonconforming.hh:101
CVFEGridVolumeVariables< Traits, enableCache > type
Definition pq1nonconforming.hh:79
typename Dune::BCRSMatrix< MatrixBlock > type
Definition pq1nonconforming.hh:165
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition pq1nonconforming.hh:154
Definition pq1nonconforming.hh:53
std::tuple< GridProperties > InheritsFrom
Definition pq1nonconforming.hh:53
Definition pq1nonconforming.hh:55
std::tuple< PQ1NonconformingBase > InheritsFrom
Definition pq1nonconforming.hh:55
Definition pq1nonconforming.hh:54
std::tuple< FiniteVolumeModel, PQ1NonconformingBase > InheritsFrom
Definition pq1nonconforming.hh:54