version 3.11-dev
fcstaggered.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//
15#ifndef DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_HH
16#define DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_HH
17
18#include <concepts>
19#include <type_traits>
20
23
28
33
34namespace Dumux::Properties {
35
37// Create new type tags
38namespace TTag {
39struct FaceCenteredStaggeredModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
40} // end namespace TTag
41
43template<class TypeTag>
44struct GridGeometry<TypeTag, TTag::FaceCenteredStaggeredModel>
45{
46private:
47 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
49public:
51};
52
54template<class TypeTag>
55struct GridVolumeVariables<TypeTag, TTag::FaceCenteredStaggeredModel>
56{
57private:
58 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
62public:
64};
65
66
68template<class TypeTag>
69struct GridFluxVariablesCache<TypeTag, TTag::FaceCenteredStaggeredModel>
70{
71private:
72 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
75 using FluxVariablesCache = GetPropTypeOr<TypeTag,
76 Properties::FluxVariablesCache, FluxVariablesCaching::EmptyCache<Scalar>
77 >;
78 using FluxVariablesCacheFiller = GetPropTypeOr<TypeTag,
79 Properties::FluxVariablesCacheFiller, FluxVariablesCaching::EmptyCacheFiller
80 >;
81public:
83};
84
86template<class TypeTag>
87struct GridVariables<TypeTag, TTag::FaceCenteredStaggeredModel>
88{
89private:
93public:
95};
96
98template<class TypeTag>
99struct ElementBoundaryTypes<TypeTag, TTag::FaceCenteredStaggeredModel>
100{
101private:
103 using BoundaryTypes = typename ProblemTraits<Problem>::BoundaryTypes;
104public:
106};
107
108} // namespace Dumux::Properties
109
110namespace Dumux::Detail {
111
112template<class Problem>
113struct ProblemTraits<Problem, DiscretizationMethods::FCStaggered>
114{
115private:
116 using GG = std::decay_t<decltype(std::declval<Problem>().gridGeometry())>;
117 using Element = typename GG::GridView::template Codim<0>::Entity;
118 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
119public:
120 using GridGeometry = GG;
121 // BoundaryTypes is whatever the problem returns from boundaryTypes(element, scv)
122 using BoundaryTypes = std::decay_t<decltype(std::declval<Problem>().boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>;
123};
124
125template<class TypeTag>
126concept FaceCenteredStaggeredModel = std::is_same_v<
127 typename GetPropType<TypeTag, Properties::GridGeometry>::DiscretizationMethod,
128 DiscretizationMethods::FCStaggered
129>;
130
131} // end namespace Detail
132
133#endif
The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux ...
Definition: discretization/fvgridvariables.hh:30
This class stores an array of BoundaryTypes objects.
Definition: facecentered/staggered/elementboundarytypes.hh:25
Base class for the finite volume geometry vector for face-centered staggered models This builds up th...
Definition: discretization/facecentered/staggered/fvgridgeometry.hh:86
Flux variable caches on a gridview.
Definition: discretization/facecentered/staggered/gridfluxvariablescache.hh:48
Base class for the grid volume variables.
Definition: facecentered/staggered/gridvolumevariables.hh:45
Defines all properties used in Dumux.
Type traits for problem classes.
Definition: fcstaggered.hh:126
Global flux variable cache.
Boundary types gathered on an element.
The grid volume variables class for face-centered staggered models.
Calculates the element-wise residual for the box scheme.
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
The energy balance equation for a porous solid.
Definition: common/properties.hh:26
std::decay_t< decltype(std::declval< Problem >().boundaryTypes(std::declval< Element >(), std::declval< SubControlVolumeFace >()))> BoundaryTypes
Definition: fcstaggered.hh:122
Definition: common/typetraits/problem.hh:23
Definition: facecentered/staggered/gridvolumevariables.hh:29
The empty filler class corresponding to EmptyCache.
Definition: fluxvariablescaching.hh:20
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: fcstaggered.hh:39