version 3.8
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-FileCopyrightInfo: 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
20
22
25
32
34
35namespace Dumux {
36namespace Properties {
37
39// Create new type tags
40namespace TTag {
41struct CCTpfaModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
42} // end namespace TTag
43
45template<class TypeTag>
46struct GridGeometry<TypeTag, TTag::CCTpfaModel>
47{
48private:
49 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
51public:
53};
54
56template<class TypeTag>
57struct GridVolumeVariables<TypeTag, TTag::CCTpfaModel>
58{
59private:
60 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
63public:
65};
66
68template<class TypeTag>
69struct GridFluxVariablesCache<TypeTag, TTag::CCTpfaModel>
70{
71private:
72 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
74
76 using FluxVariablesCache = GetPropTypeOr<TypeTag,
77 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
78 >;
79 using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
80 Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
81 >;
82public:
84};
85
87template<class TypeTag>
88struct ElementBoundaryTypes<TypeTag, TTag::CCTpfaModel> { using type = CCElementBoundaryTypes; };
89
91template<class TypeTag>
92struct BaseLocalResidual<TypeTag, TTag::CCTpfaModel> { using type = CCLocalResidual<TypeTag>; };
93} // namespace Properties
94
95namespace Detail {
96
97template<class Problem>
98struct ProblemTraits<Problem, DiscretizationMethods::CCTpfa>
99{
100private:
101 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
102 using Element = typename GG::GridView::template Codim<0>::Entity;
103 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
104public:
105 using GridGeometry = GG;
106 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scvf)
107 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>;
108};
109
110} // end namespace Detail
111
112} // namespace Dumux
113
114#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:69
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
Defines all properties used in Dumux.
Type traits for problem classes.
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
std::decay_t< decltype(std::declval< Problem >().boundaryTypes(std::declval< Element >(), std::declval< SubControlVolumeFace >()))> BoundaryTypes
Definition: cctpfa.hh:107
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:41
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: cctpfa.hh:41