basicproperties.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 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
28#ifndef EWOMS_BASIC_PROPERTIES_HH
29#define EWOMS_BASIC_PROPERTIES_HH
30
31#include <dune/common/parametertree.hh>
32
36
37#if HAVE_DUNE_FEM
38#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
39#endif
40
41namespace Opm {
42
43template<class TypeTag> class DgfVanguard;
44
45}
46
47namespace Opm::Properties {
48
50// Type tag definitions:
51//
52// NumericModel
53// |
54// +-> ImplicitModel
56
57// Create new type tags
58namespace TTag {
59
61struct NumericModel {};
62
64struct ImplicitModel { using InheritsFrom = std::tuple<NumericModel>; };
65
66} // end namespace TTag
67
69// Property names which are always available:
70//
71// Scalar
73
75template<class TypeTag, class MyTypeTag>
76struct Scalar { using type = UndefinedProperty; };
77
79template<class TypeTag, class MyTypeTag>
80struct NumEq { using type = UndefinedProperty; };
81
83template<class TypeTag, class MyTypeTag>
85
87template<class TypeTag, class MyTypeTag>
89
91template<class TypeTag, class MyTypeTag>
92struct Model { using type = UndefinedProperty; };
93
95template<class TypeTag, class MyTypeTag>
97
99template<class TypeTag, class MyTypeTag>
100struct Vanguard { using type = UndefinedProperty; };
101
103template<class TypeTag, class MyTypeTag>
104struct Grid { using type = UndefinedProperty; };
105
106template<class TypeTag, class MyTypeTag>
107struct GridView { using type = UndefinedProperty; };
108
109#if HAVE_DUNE_FEM
110template<class TypeTag, class MyTypeTag>
111struct GridPart { using type = UndefinedProperty; };
112#endif
113
115template<class TypeTag, class MyTypeTag>
117
119template<class TypeTag, class MyTypeTag>
120struct Simulator { using type = UndefinedProperty; };
121
128template<class TypeTag, class MyTypeTag>
130
132// Values for the properties
134
136template<class TypeTag>
137struct Scalar<TypeTag, TTag::NumericModel> { using type = double; };
138
140template<class TypeTag>
141struct ParameterTree<TypeTag, TTag::NumericModel>
142{
143 using type = Dune::ParameterTree;
144
145 static Dune::ParameterTree& tree()
146 {
147 static Dune::ParameterTree obj_;
148 return obj_;
149 }
150};
151
153template<class TypeTag>
154struct ModelParameterGroup<TypeTag, TTag::NumericModel>
155{ static constexpr auto value = ""; };
156
157#if HAVE_DUNE_FEM
158template<class TypeTag>
159struct GridPart<TypeTag, TTag::NumericModel>
160{
162 using type = Dune::Fem::AdaptiveLeafGridPart<Grid>;
163};
164
165template<class TypeTag>
166struct GridView<TypeTag, TTag::NumericModel>
168#else
173template<class TypeTag>
174struct GridView<TypeTag, TTag::NumericModel>
176#endif
177
178template<class TypeTag>
179struct Vanguard<TypeTag, TTag::NumericModel>
181
182} // namespace Opm::Properties
183
184#endif
Defines some fundamental parameters for all models.
Provides a simulator vanguard which creates a grid by parsing a Dune Grid Format (DGF) file.
Definition: dgfvanguard.hh:50
Definition: blackoilmodel.hh:80
Definition: blackoilbioeffectsmodules.hh:43
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:233
This file provides the infrastructure to retrieve run-time parameters.
The Opm property system, traits with inheritance.
The class which marks the border indices associated with the degrees of freedom on a process boundary...
Definition: basicproperties.hh:129
The type of the DUNE grid.
Definition: basicproperties.hh:104
typename GetPropType< TypeTag, Properties::Grid >::LeafGridView type
Definition: basicproperties.hh:175
level of the grid view
Definition: basicproperties.hh:116
Definition: basicproperties.hh:107
UndefinedProperty type
Definition: basicproperties.hh:107
Property which defines the group that is queried for parameters by default.
Definition: basicproperties.hh:96
The type of the model.
Definition: basicproperties.hh:92
Number of derivatives in the system of PDEs.
Definition: basicproperties.hh:84
Number of equations in the system of PDEs.
Definition: basicproperties.hh:80
Dune::ParameterTree type
Definition: basicproperties.hh:143
static Dune::ParameterTree & tree()
Definition: basicproperties.hh:145
Property which provides a Dune::ParameterTree.
Definition: basicproperties.hh:88
double type
Definition: basicproperties.hh:137
Property to specify the type of scalar values.
Definition: basicproperties.hh:76
Manages the simulation time.
Definition: basicproperties.hh:120
Type tag for all fully coupled models.
Definition: basicproperties.hh:64
std::tuple< NumericModel > InheritsFrom
Definition: basicproperties.hh:64
Type tag for all models.
Definition: basicproperties.hh:61
a tag to mark properties as undefined
Definition: propertysystem.hh:38
Property which provides a Vanguard (manages grids)
Definition: basicproperties.hh:100