version 3.11-dev
Loading...
Searching...
No Matches
defaultgridvariables.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#ifndef DUMUX_DISCRETIZATION_DEFAULT_GRID_VARIABLES_HH
13#define DUMUX_DISCRETIZATION_DEFAULT_GRID_VARIABLES_HH
14
15#include <type_traits>
16
21#include <dumux/discretization/cvfe/gridvariablescache_.hh>
26
27#ifndef DOXYGEN
28namespace Dumux::Detail {
29
30template<class TypeTag, bool = Properties::hasDefinedType<TypeTag, Properties::Variables>()>
31struct DefaultVariables
32{ using type = GetPropType<TypeTag, Properties::Variables>; };
33
34template<class TypeTag>
35struct DefaultVariables<TypeTag, false>
36{ using type = Dumux::Detail::CVFE::VariablesAdapter<GetPropType<TypeTag, Properties::VolumeVariables>>; };
37
38} // end namespace Dumux::Detail
39#endif // DOXYGEN
40
41namespace Dumux::Experimental {
42
57template<class GridDiscretization, class Problem, class Variables, bool enableCache,
58 class InterpolationPointData = Dumux::CVFE::LocalBasisInterpolationPointData<GridDiscretization>>
59using DefaultGridVariablesCache = std::conditional_t<
62 std::conditional_t<
65 CVFE::CVFEGridVariablesCache<CVFE::CVFEDefaultGridVariablesCacheTraits<Problem, Variables, InterpolationPointData>, enableCache>
66 >
67>;
68
80template<class TypeTag,
81 class Variables = typename Dumux::Detail::DefaultVariables<TypeTag>::type>
89 >
90>;
91
92} // end namespace Dumux::Experimental
93
94namespace Dumux::Detail {
95
103template<class TypeTag>
115
116#ifndef DOXYGEN
117template<class TypeTag, bool = usesVariables<TypeTag>()>
118struct CVFEGridVariables
119{
123};
124
125template<class TypeTag>
126struct CVFEGridVariables<TypeTag, true>
127{ using type = Experimental::DefaultGridVariables<TypeTag>; };
128#endif // DOXYGEN
129
136template<class TypeTag>
137using CVFEGridVariables_t = typename CVFEGridVariables<TypeTag>::type;
138
139} // end namespace Dumux::Detail
140
141#endif
The grid variables cache class for hybrid control-volume finite element methods.
Definition cvfe/hybrid/gridvariablescache.hh:51
Base class for the grid local variables.
Definition fem/gridvariablescache.hh:52
The grid variables class for general schemes, storing variables and data.
Definition discretization/gridvariables.hh:27
Base class for all standard finite volume or finite element problems.
Definition common/problem.hh:39
Class that represents the variables of a model. We assume that models are formulated on the basis of ...
Definition experimental/common/variables.hh:41
The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux ...
Definition discretization/fvgridvariables.hh:30
Defines all properties used in Dumux.
Concept for pure finite-element discretizations (no FV structure).
Definition concepts.hh:50
Concept for hybrid finite-element/finite-volume discretizations.
Definition concepts.hh:39
Concepts for discretization types.
The grid variables cache class for hybrid control-volume finite element methods.
Classes representing interpolation point data for control-volume finite element schemes.
The grid variable class for finite volume schemes, storing variables on scv and scvf (volume and flux...
The grid variables class for general schemes, storing variables and data.
The grid local variables class for finite element methods.
std::conditional_t< Concepts::FEElementDiscretization< typename GridDiscretization::LocalView >, FEGridVariablesCache< FEDefaultGridVariablesCacheTraits< Problem, Variables, InterpolationPointData >, enableCache >, std::conditional_t< Concepts::HybridElementDiscretization< typename GridDiscretization::LocalView >, CVFE::HybridCVFEGridVariablesCache< CVFE::HybridCVFEDefaultGridVariablesCacheTraits< Problem, Variables, InterpolationPointData >, enableCache >, CVFE::CVFEGridVariablesCache< CVFE::CVFEDefaultGridVariablesCacheTraits< Problem, Variables, InterpolationPointData >, enableCache > > > DefaultGridVariablesCache
The grid variables cache selected depending on the element discretization.
Definition defaultgridvariables.hh:59
typename CVFEGridVariables< TypeTag >::type CVFEGridVariables_t
The grid variables of a control-volume finite element type tag: Experimental::DefaultGridVariables if...
Definition defaultgridvariables.hh:137
constexpr bool usesVariables()
Whether a type tag assembles with the variables per local degree of freedom.
Definition defaultgridvariables.hh:104
GridVariables< GetPropType< TypeTag, Properties::GridGeometry >, DefaultGridVariablesCache< GetPropType< TypeTag, Properties::GridGeometry >, GetPropType< TypeTag, Properties::Problem >, Variables, getPropValue< TypeTag, Properties::EnableGridVolumeVariablesCache >() > > DefaultGridVariables
The grid variables of a model whose variables are defined per local degree of freedom.
Definition defaultgridvariables.hh:82
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
constexpr bool hasDefinedType()
whether the property is defined/specialized for TypeTag
Definition propertysystem.hh:251
Definition cvfelocalresidual.hh:25
Definition assembly/assembler.hh:46