version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
cctpfa.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#ifndef DUMUX_DISCRETIZATION_CC_TPFA_HH
15#define DUMUX_DISCRETIZATION_CC_TPFA_HH
16
17#include <concepts>
18#include <type_traits>
19
23
25
29
36
38
39namespace Dumux {
40namespace Properties {
41
43// Create new type tags
44namespace TTag {
45struct CCTpfaModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
46} // end namespace TTag
47
49template<class TypeTag>
50struct GridGeometry<TypeTag, TTag::CCTpfaModel>
51{
52private:
53 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
55public:
57};
58
60template<class TypeTag>
61struct GridVolumeVariables<TypeTag, TTag::CCTpfaModel>
62{
63private:
64 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
67public:
69};
70
72template<class TypeTag>
73struct GridFluxVariablesCache<TypeTag, TTag::CCTpfaModel>
74{
75private:
76 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
78
80 using FluxVariablesCache = GetPropTypeOr<TypeTag,
81 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
82 >;
83 using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
84 Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
85 >;
86public:
88};
89
91template<class TypeTag>
92struct ElementBoundaryTypes<TypeTag, TTag::CCTpfaModel> { using type = CCElementBoundaryTypes; };
93
94} // namespace Properties
95
96namespace Detail {
97
98template<class Problem>
99struct ProblemTraits<Problem, DiscretizationMethods::CCTpfa>
100{
101private:
102 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
103 using Element = typename GG::GridView::template Codim<0>::Entity;
104 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
105public:
106 using GridGeometry = GG;
107 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scvf)
108 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>;
109};
110
111template<class TypeTag>
112concept CCTpfaModel = std::is_same_v<
113 typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod,
114 DiscretizationMethods::CCTpfa
115>;
116
117template<CCTpfaModel TypeTag>
119{
121};
122
123} // end namespace Detail
124
125} // namespace Dumux
126
127#endif
Boundary flag to store e.g. in sub control volume faces.
Calculates the element-wise residual for cell-centered discretization schemes.
Boundary types gathered on an element.
The grid volume variables class for cell centered tpfa models.
Boundary types gathered on an element.
Definition: cellcentered/elementboundarytypes.hh:26
Calculates the element-wise residual for the cell-centered discretization schemes.
Definition: cclocalresidual.hh:31
The finite volume geometry (scvs and scvfs) for cell-centered TPFA models on a grid view This builds ...
Definition: discretization/cellcentered/tpfa/fvgridgeometry.hh:71
Flux variable caches on a gridview.
Definition: discretization/cellcentered/tpfa/gridfluxvariablescache.hh:48
Base class for the grid volume variables.
Definition: cellcentered/tpfa/gridvolumevariables.hh:44
The element-wise residual for control-volume finite element schemes.
Definition: cvfelocalresidual.hh:60
Defines all properties used in Dumux.
Type traits for problem classes.
Definition: cctpfa.hh:112
The default local operator than can be specialized for each discretization scheme.
Sub control volumes for cell-centered discretization schemes.
The finite volume geometry (scvs and scvfs) for cell-centered TPFA models on a grid view This builds ...
Flux variable caches on a gridview.
The sub control volume face.
Classes related to flux variables caching.
Declares properties required for finite-volume models models.
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: adapt.hh:17
typename Detail::DiscretizationDefaultLocalOperator< TypeTag >::type DiscretizationDefaultLocalOperator
Definition: defaultlocaloperator.hh:27
std::decay_t< decltype(std::declval< Problem >().boundaryTypes(std::declval< Element >(), std::declval< SubControlVolumeFace >()))> BoundaryTypes
Definition: cctpfa.hh:108
Definition: common/typetraits/problem.hh:23
The empty filler class corresponding to EmptyCache.
Definition: fluxvariablescaching.hh:20
An empty flux variables cache.
Definition: fluxvariablescaching.hh:35
Definition: cctpfa.hh:45
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: cctpfa.hh:45