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>
33
35#include <dumux/common/typetraits/boundary_.hh>
36
46
51
52namespace Dumux::Properties {
53
55// Create new type tags
56namespace TTag {
57struct PQ1NonconformingBase { using InheritsFrom = std::tuple<GridProperties>; };
58struct PQ1NonconformingFVModel { using InheritsFrom = std::tuple<FiniteVolumeModel, PQ1NonconformingBase>; };
59struct PQ1NonconformingFEModel { using InheritsFrom = std::tuple<PQ1NonconformingBase>; };
60} // end namespace TTag
61
63template<class TypeTag>
64struct GridGeometry<TypeTag, TTag::PQ1NonconformingFVModel>
65{
66private:
67 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
69public:
71};
72
74template<class TypeTag>
85
87template<class TypeTag>
88struct GridFluxVariablesCache<TypeTag, TTag::PQ1NonconformingFVModel>
89{
90private:
91 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
93
95 using FluxVariablesCache = GetPropTypeOr<TypeTag,
96 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
97 >;
98public:
100};
101
103template<class TypeTag>
104struct GridVariables<TypeTag, TTag::PQ1NonconformingFVModel>
105{
106private:
110public:
112};
113
115template<class TypeTag>
116struct FluxVariablesCache<TypeTag, TTag::PQ1NonconformingFVModel>
117{
118private:
121public:
123};
124
126template<class TypeTag>
127struct ElementBoundaryTypes<TypeTag, TTag::PQ1NonconformingBase>
128{
129private:
131 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
132 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
133public:
134 // Check if problem has new boundaryTypes interface
135 // then use ElementIntersectionBoundaryTypes
136 using type = std::conditional_t<
137 Dumux::Detail::hasProblemBoundaryTypesForFaceFunction<Problem, typename GG::LocalView>(),
140 >;
141};
142
144template<class TypeTag>
145struct GridGeometry<TypeTag, TTag::PQ1NonconformingFEModel>
146{
147private:
148 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
151public:
153};
154
155template<class TypeTag>
156struct GridVariables<TypeTag, TTag::PQ1NonconformingFEModel>
157{
158private:
160 // ToDo: Do not determine enableCache by EnableGridVolumeVariablesCache
161 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
167public:
169};
170
172template<class TypeTag>
173struct EnableGridVolumeVariablesCache<TypeTag, TTag::PQ1NonconformingFEModel> { static constexpr bool value = false; };
174
176template<class TypeTag>
177struct SolutionVector<TypeTag, TTag::PQ1NonconformingFEModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
178
180template<class TypeTag>
181struct JacobianMatrix<TypeTag, TTag::PQ1NonconformingFEModel>
182{
183private:
186 using MatrixBlock = typename Dune::FieldMatrix<Scalar, numEq, numEq>;
187public:
189};
190
191} // namespace Dumux::Properties
192
193namespace Dumux::Detail {
194
195template<class Problem>
196struct ProblemTraits<Problem, DiscretizationMethods::PQ1Nonconforming>
197{
198private:
199 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
200public:
201 using GridGeometry = GG;
202 // Determine BoundaryTypes dependent on the used problem interface, either boundaryTypes(element, scv) or boundaryTypes(element, boundaryFace)
203 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView>::type;
204};
205
206template<class TypeTag>
207concept PQ1NonconformingModel = std::is_same_v<
210>;
211template<class T>
213template<PQ1NonconformingFVModel TypeTag>
215{
216private:
218 static constexpr bool usesGeneralGridVariables =
219 Dumux::Concept::GridVariables<GV> && !Dumux::Concept::FVGridVariables<GV>;
220public:
221 using type = std::conditional_t<usesGeneralGridVariables,
222 Dumux::Experimental::CVFELocalResidual<TypeTag>,
224};
225
226template<class T>
228
229template<PQ1NonconformingFEModel TypeTag>
232
233} // end namespace Dumux::Detail
234
235#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
Flux variables cache class for control-volume finite element schemes. For control-volume finite eleme...
Definition discretization/cvfe/fluxvariablescache.hh:34
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
The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux ...
Definition discretization/fvgridvariables.hh:30
Grid geometry for the diamond discretization.
Definition discretization/facecentered/diamond/fvgridgeometry.hh:84
Definition matrix.hh:20
Defines all properties used in Dumux.
Type traits for problem classes.
Definition pq1nonconforming.hh:227
Definition pq1nonconforming.hh:212
Definition pq1nonconforming.hh:207
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.
Grid geometry for the diamond discretization.
The grid variable class for finite volume schemes, storing variables on scv and scvf (volume and flux...
The grid variables class for general schemes, storing variables and data.
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.
CVFEGridFluxVariablesCacheImpl< Problem, FluxVariablesCache, cachingEnabled, Traits, Detail::ScvfQuadratureRuleOrDefault_t< typename Traits::FluxVariablesCache > > CVFEGridFluxVariablesCache
Flux variable caches on a gridview.
Definition discretization/cvfe/gridfluxvariablescache.hh:58
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::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/gridvariablescache.hh:31
CCLocalResidual< TypeTag > type
Definition ccmpfa.hh:185
Definition defaultlocaloperator.hh:19
Detail::BoundaryTypes< Problem, typename GG::LocalView >::type BoundaryTypes
Definition pq1nonconforming.hh:203
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 pq1nonconforming.hh:136
CVFEFluxVariablesCache< S, GG > type
Definition pq1nonconforming.hh:122
CVFEGridFluxVariablesCache< Problem, FluxVariablesCache, enableCache > type
Definition pq1nonconforming.hh:99
Dumux::Experimental::PQ1NonconformingFEGridDiscretization< Scalar, GridView, enableCache > type
Definition pq1nonconforming.hh:152
FaceCenteredDiamondFVGridGeometry< GridView, enableCache > type
Definition pq1nonconforming.hh:70
Dumux::Experimental::GridVariables< GG, GVC > type
Definition pq1nonconforming.hh:168
FVGridVariables< GG, GVV, GFVC > type
Definition pq1nonconforming.hh:111
Dumux::Detail::CVFE::CVFEGridVariablesCache< Traits, enableCache > type
Definition pq1nonconforming.hh:83
typename Dune::BCRSMatrix< MatrixBlock > type
Definition pq1nonconforming.hh:188
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition pq1nonconforming.hh:177
Definition pq1nonconforming.hh:57
std::tuple< GridProperties > InheritsFrom
Definition pq1nonconforming.hh:57
Definition pq1nonconforming.hh:59
std::tuple< PQ1NonconformingBase > InheritsFrom
Definition pq1nonconforming.hh:59
Definition pq1nonconforming.hh:58
std::tuple< FiniteVolumeModel, PQ1NonconformingBase > InheritsFrom
Definition pq1nonconforming.hh:58