opm-simulators
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 
41 namespace Opm {
42 
43 template<class TypeTag> class DgfVanguard;
44 
45 }
46 
47 namespace Opm::Properties {
48 
50 // Type tag definitions:
51 //
52 // NumericModel
53 // |
54 // +-> ImplicitModel
56 
57 // Create new type tags
58 namespace TTag {
59 
61 struct NumericModel {};
62 
64 struct ImplicitModel { using InheritsFrom = std::tuple<NumericModel>; };
65 
66 } // end namespace TTag
67 
69 // Property names which are always available:
70 //
71 // Scalar
73 
75 template<class TypeTag, class MyTypeTag>
76 struct Scalar { using type = UndefinedProperty; };
77 
79 template<class TypeTag, class MyTypeTag>
80 struct NumEq { using type = UndefinedProperty; };
81 
83 template<class TypeTag, class MyTypeTag>
85 
87 template<class TypeTag, class MyTypeTag>
88 struct ParameterTree { using type = UndefinedProperty; };
89 
91 template<class TypeTag, class MyTypeTag>
92 struct Model { using type = UndefinedProperty; };
93 
95 template<class TypeTag, class MyTypeTag>
97 
99 template<class TypeTag, class MyTypeTag>
100 struct Vanguard { using type = UndefinedProperty; };
101 
103 template<class TypeTag, class MyTypeTag>
104 struct Grid { using type = UndefinedProperty; };
105 
106 template<class TypeTag, class MyTypeTag>
107 struct GridView { using type = UndefinedProperty; };
108 
109 #if HAVE_DUNE_FEM
110 template<class TypeTag, class MyTypeTag>
111 struct GridPart { using type = UndefinedProperty; };
112 #endif
113 
115 template<class TypeTag, class MyTypeTag>
117 
119 template<class TypeTag, class MyTypeTag>
120 struct Simulator { using type = UndefinedProperty; };
121 
128 template<class TypeTag, class MyTypeTag>
130 
132 // Values for the properties
134 
136 template<class TypeTag>
137 struct Scalar<TypeTag, TTag::NumericModel> { using type = double; };
138 
140 template<class TypeTag>
141 struct 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 
153 template<class TypeTag>
154 struct ModelParameterGroup<TypeTag, TTag::NumericModel>
155 { static constexpr auto value = ""; };
156 
157 #if HAVE_DUNE_FEM
158 template<class TypeTag>
159 struct GridPart<TypeTag, TTag::NumericModel>
160 {
162  using type = Dune::Fem::AdaptiveLeafGridPart<Grid>;
163 };
164 
165 template<class TypeTag>
166 struct GridView<TypeTag, TTag::NumericModel>
168 #else
169 template<class TypeTag>
174 struct GridView<TypeTag, TTag::NumericModel>
176 #endif
177 
178 template<class TypeTag>
179 struct Vanguard<TypeTag, TTag::NumericModel>
180 { using type = Opm::DgfVanguard<TypeTag>; };
181 
182 } // namespace Opm::Properties
183 
184 #endif
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
Type tag for all fully coupled models.
Definition: basicproperties.hh:64
This file provides the infrastructure to retrieve run-time parameters.
Provides a simulator vanguard which creates a grid by parsing a Dune Grid Format (DGF) file...
Definition: dgfvanguard.hh:49
a tag to mark properties as undefined
Definition: propertysystem.hh:38
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
Defines some fundamental parameters for all models.
The class which marks the border indices associated with the degrees of freedom on a process boundary...
Definition: basicproperties.hh:129
Number of derivatives in the system of PDEs.
Definition: basicproperties.hh:84
Property which defines the group that is queried for parameters by default.
Definition: basicproperties.hh:96
The type of the DUNE grid.
Definition: basicproperties.hh:104
Property to specify the type of scalar values.
Definition: basicproperties.hh:76
Property which provides a Vanguard (manages grids)
Definition: basicproperties.hh:100
level of the grid view
Definition: basicproperties.hh:116
The type of the model.
Definition: basicproperties.hh:92
Type tag for all models.
Definition: basicproperties.hh:61
The Opm property system, traits with inheritance.
Definition: basicproperties.hh:107
Property which provides a Dune::ParameterTree.
Definition: basicproperties.hh:88
Manages the simulation time.
Definition: basicproperties.hh:120
Definition: blackoilmodel.hh:80
Number of equations in the system of PDEs.
Definition: basicproperties.hh:80