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>
88struct Model { using type = UndefinedProperty; };
89
91template<class TypeTag, class MyTypeTag>
93
95template<class TypeTag, class MyTypeTag>
96struct Vanguard { using type = UndefinedProperty; };
97
99template<class TypeTag, class MyTypeTag>
100struct Grid { using type = UndefinedProperty; };
101
102template<class TypeTag, class MyTypeTag>
103struct GridView { using type = UndefinedProperty; };
104
105#if HAVE_DUNE_FEM
106template<class TypeTag, class MyTypeTag>
107struct GridPart { using type = UndefinedProperty; };
108#endif
109
111template<class TypeTag, class MyTypeTag>
113
115template<class TypeTag, class MyTypeTag>
116struct Simulator { using type = UndefinedProperty; };
117
124template<class TypeTag, class MyTypeTag>
126
128// Values for the properties
130
132template<class TypeTag>
133struct Scalar<TypeTag, TTag::NumericModel> { using type = double; };
134
136template<class TypeTag>
137struct ParameterTree<TypeTag, TTag::NumericModel>
138{
139 using type = Dune::ParameterTree;
140
141 static Dune::ParameterTree& tree()
142 {
143 static Dune::ParameterTree obj_;
144 return obj_;
145 }
146};
147
149template<class TypeTag>
150struct ModelParameterGroup<TypeTag, TTag::NumericModel>
151{ static constexpr auto value = ""; };
152
153#if HAVE_DUNE_FEM
154template<class TypeTag>
155struct GridPart<TypeTag, TTag::NumericModel>
156{
158 using type = Dune::Fem::AdaptiveLeafGridPart<Grid>;
159};
160
161template<class TypeTag>
162struct GridView<TypeTag, TTag::NumericModel>
164#else
169template<class TypeTag>
170struct GridView<TypeTag, TTag::NumericModel>
172#endif
173
174template<class TypeTag>
175struct Vanguard<TypeTag, TTag::NumericModel>
177
178} // namespace Opm::Properties
179
180#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:72
Definition: blackoilboundaryratevector.hh:37
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:235
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:125
The type of the DUNE grid.
Definition: basicproperties.hh:100
typename GetPropType< TypeTag, Properties::Grid >::LeafGridView type
Definition: basicproperties.hh:171
level of the grid view
Definition: basicproperties.hh:112
Definition: basicproperties.hh:103
UndefinedProperty type
Definition: basicproperties.hh:103
Property which defines the group that is queried for parameters by default.
Definition: basicproperties.hh:92
The type of the model.
Definition: basicproperties.hh:88
Number of equations in the system of PDEs.
Definition: basicproperties.hh:80
Dune::ParameterTree type
Definition: basicproperties.hh:139
static Dune::ParameterTree & tree()
Definition: basicproperties.hh:141
Property which provides a Dune::ParameterTree.
Definition: basicproperties.hh:84
double type
Definition: basicproperties.hh:133
Property to specify the type of scalar values.
Definition: basicproperties.hh:76
Manages the simulation time.
Definition: basicproperties.hh:116
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:40
Property which provides a Vanguard (manages grids)
Definition: basicproperties.hh:96