version 3.11-dev
fcdiamond.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_FACECENTERED_DIAMOND_HH
15#define DUMUX_DISCRETIZATION_FACECENTERED_DIAMOND_HH
16
17#include <concepts>
18#include <type_traits>
19
22
28
35
36namespace Dumux::Properties {
37
39// Create new type tags
40namespace TTag {
41struct FaceCenteredDiamondModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
42} // end namespace TTag
43
45template<class TypeTag>
46struct GridGeometry<TypeTag, TTag::FaceCenteredDiamondModel>
47{
48private:
49 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
51public:
53};
54
56template<class TypeTag>
57struct GridVolumeVariables<TypeTag, TTag::FaceCenteredDiamondModel>
58{
59private:
60 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
64public:
66};
67
69template<class TypeTag>
70struct GridFluxVariablesCache<TypeTag, TTag::FaceCenteredDiamondModel>
71{
72private:
73 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
75
77 using FluxVariablesCache = GetPropTypeOr<TypeTag,
78 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
79 >;
80public:
82};
83
85template<class TypeTag>
86struct GridVariables<TypeTag, TTag::FaceCenteredDiamondModel>
87{
88private:
92public:
94};
95
97template<class TypeTag>
98struct FluxVariablesCache<TypeTag, TTag::FaceCenteredDiamondModel>
99{
100private:
103public:
105};
106
108template<class TypeTag>
109struct ElementBoundaryTypes<TypeTag, TTag::FaceCenteredDiamondModel>
110{
111private:
113 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
114public:
116};
117
118} // namespace Dumux::Properties
119
120namespace Dumux::Detail {
121
122template<class Problem>
123struct ProblemTraits<Problem, DiscretizationMethods::FCDiamond>
124{
125private:
126 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
127 using Element = typename GG::GridView::template Codim<0>::Entity;
128 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
129public:
130 using GridGeometry = GG;
131 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scv)
132 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>;
133};
134
135template<class TypeTag>
136concept FaceCenteredDiamondModel = std::is_same_v<
137 typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod,
139>;
140
141template<FaceCenteredDiamondModel TypeTag>
143{
145};
146
147} // end namespace Dumux::Detail
148
149#endif
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:30
Flux variable caches on a gridview.
Definition: discretization/cvfe/gridfluxvariablescache.hh:46
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:63
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:76
Defines all properties used in Dumux.
Type traits for problem classes.
Definition: fcdiamond.hh:136
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.
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.
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: cvfelocalresidual.hh:28
CVFE< CVFEMethods::CR_RT > FCDiamond
Definition: method.hh:101
The energy balance equation for a porous solid.
Definition: common/properties.hh:26
typename Detail::DiscretizationDefaultLocalOperator< TypeTag >::type DiscretizationDefaultLocalOperator
Definition: defaultlocaloperator.hh:27
Definition: cvfe/gridvolumevariables.hh:31
std::decay_t< decltype(std::declval< Problem >().boundaryTypes(std::declval< Element >(), std::declval< SubControlVolumeFace >()))> BoundaryTypes
Definition: fcdiamond.hh:132
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:34
std::tuple< FiniteVolumeModel > InheritsFrom
Definition: fcdiamond.hh:41