version 3.11-dev
Loading...
Searching...
No Matches
pq3.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_PQ3_HH
14#define DUMUX_DISCRETIZATION_PQ3_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
40
42
43namespace Dumux::Properties {
44
45namespace TTag {
46struct PQ3HybridModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
47} // end namespace TTag
48
49template<class TypeTag>
50struct GridGeometry<TypeTag, TTag::PQ3HybridModel>
51{
52private:
53 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
56public:
58};
59
60template<class TypeTag>
71
72template<class TypeTag>
73struct FluxVariablesCache<TypeTag, TTag::PQ3HybridModel>
74{
75private:
78public:
80};
81
82template<class TypeTag>
83struct GridFluxVariablesCache<TypeTag, TTag::PQ3HybridModel>
84{
85private:
86 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
89 using FluxVariablesCache = GetPropTypeOr<TypeTag,
90 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
91 >;
92public:
94};
95
96template<class TypeTag>
97struct ElementBoundaryTypes<TypeTag, TTag::PQ3HybridModel>
98{
99private:
101 using GG = std::decay_t<decltype(std::declval<Problem>().gridDiscretization())>;
102 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
103public:
104 using type = std::conditional_t<
105 Dumux::Detail::hasProblemBoundaryTypesForFaceFunction<Problem, typename GG::LocalView>(),
108 >;
109};
110
111} // namespace Dumux::Properties
112
113namespace Dumux::Detail {
114
115template<class Problem>
117{
118private:
119 using GG = std::decay_t<decltype(std::declval<Problem>().gridDiscretization())>;
120public:
121 using GridGeometry = GG;
122 using BoundaryTypes = Detail::BoundaryTypes<Problem, typename GG::LocalView>::type;
123};
124
125template<class TypeTag>
126concept PQ3HybridModel = std::is_same_v<
129>;
130
131template<PQ3HybridModel TypeTag>
133{
134private:
136 static constexpr bool usesGeneralGridVariables =
137 Dumux::Concept::GridVariables<GV> && !Dumux::Concept::FVGridVariables<GV>;
138public:
139 using type = std::conditional_t<usesGeneralGridVariables,
140 Dumux::Experimental::CVFELocalResidual<TypeTag>,
142};
143
144} // end namespace Dumux::Detail
145
146#endif
Boundary flag to store e.g. in sub control volume faces.
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 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
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
Finite volume geometry for the pq3 hybrid CVFE scheme (order-3 Lagrange elements).
Definition discretization/pq3/fvgridgeometry.hh:157
Defines all properties used in Dumux.
Type traits for problem classes.
Definition pq3.hh:126
Boundary types gathered on an element.
The local element solution class for control-volume finite element methods.
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.
Base class for the finite volume geometry vector for the pq3 method This builds up the sub control vo...
Boundary types gathered on an element.
Classes related to flux variables caching.
Declares properties required for finite-volume models models.
The grid local variables class for control-volume finite element methods.
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
The available discretization methods in Dumux.
Definition cvfelocalresidual.hh:25
Definition method.hh:20
CVFE< CVFEMethods::PQ3 > PQ3
Definition method.hh:128
Type tag for numeric models.
Definition grid.hh:24
The energy balance equation for a porous solid.
Definition common/properties.hh:26
std::conditional_t< usesGeneralGridVariables, Dumux::Experimental::CVFELocalResidual< TypeTag >, Dumux::CVFELocalResidual< TypeTag > > type
Definition box.hh:152
Definition defaultlocaloperator.hh:19
Detail::BoundaryTypes< Problem, typename GG::LocalView >::type BoundaryTypes
Definition pq3.hh:122
Definition common/typetraits/problem.hh:23
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 pq3.hh:104
HybridCVFEFluxVariablesCache< Scalar, GridGeometry > type
Definition pq3.hh:79
HybridCVFEGridFluxVariablesCache< Problem, FluxVariablesCache, enableCache > type
Definition pq3.hh:93
PQ3FVGridGeometry< Scalar, GridView, enableCache > type
Definition pq3.hh:57
Dumux::Detail::CVFE::CVFEGridVariablesCache< Traits, enableCache > type
Definition pq3.hh:69
std::tuple< FiniteVolumeModel > InheritsFrom
Definition pq3.hh:46