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
35
36#if HAVE_DUNE_FEM
37#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
38#endif
39
40#include <string>
41
42namespace Opm::Properties {
43
45// Type tag definitions:
46//
47// NumericModel
48// |
49// +-> ImplicitModel
51
52// Create new type tags
53namespace TTag {
55struct NumericModel { using InheritsFrom = std::tuple<ParameterSystem>; };
56
58struct ImplicitModel { using InheritsFrom = std::tuple<NumericModel>; };
59} // end namespace TTag
60
62// Property names which are always available:
63//
64// Scalar
66
68template<class TypeTag, class MyTypeTag>
69struct Scalar { using type = UndefinedProperty; };
70
72template<class TypeTag, class MyTypeTag>
73struct NumEq { using type = UndefinedProperty; };
74
76template<class TypeTag, class MyTypeTag>
78
80template<class TypeTag, class MyTypeTag>
81struct Model { using type = UndefinedProperty; };
82
84template<class TypeTag, class MyTypeTag>
86
88template<class TypeTag, class MyTypeTag>
89struct Vanguard { using type = UndefinedProperty; };
90
92template<class TypeTag, class MyTypeTag>
93struct Grid { using type = UndefinedProperty; };
94
95template<class TypeTag, class MyTypeTag>
96struct GridView { using type = UndefinedProperty; };
97
98#if HAVE_DUNE_FEM
99template<class TypeTag, class MyTypeTag>
100struct GridPart { using type = UndefinedProperty; };
101#endif
102
105template<class TypeTag, class MyTypeTag>
107
110template<class TypeTag, class MyTypeTag>
112
119template<class TypeTag, class MyTypeTag>
121
128template<class TypeTag, class MyTypeTag>
130
132template<class TypeTag, class MyTypeTag>
133struct EndTime { using type = UndefinedProperty; };
134
136template<class TypeTag, class MyTypeTag>
138
140template<class TypeTag, class MyTypeTag>
142
144template<class TypeTag, class MyTypeTag>
146
148template<class TypeTag, class MyTypeTag>
150template<class TypeTag, class MyTypeTag>
152template<class TypeTag, class MyTypeTag>
154
156template<class TypeTag, class MyTypeTag>
157struct CellsX { using type = UndefinedProperty; };
158template<class TypeTag, class MyTypeTag>
159struct CellsY { using type = UndefinedProperty; };
160template<class TypeTag, class MyTypeTag>
161struct CellsZ { using type = UndefinedProperty; };
162
164template<class TypeTag, class MyTypeTag>
165struct GridFile { using type = UndefinedProperty; };
166
168template<class TypeTag, class MyTypeTag>
170
172template<class TypeTag, class MyTypeTag>
173struct Simulator { using type = UndefinedProperty; };
174
181template<class TypeTag, class MyTypeTag>
183
185// Values for the properties
187
189template<class TypeTag>
190struct Scalar<TypeTag, TTag::NumericModel> { using type = double; };
191
193template<class TypeTag>
194struct ParameterTree<TypeTag, TTag::NumericModel>
195{
196 using type = Dune::ParameterTree;
197
198 static Dune::ParameterTree& tree()
199 {
200 static Dune::ParameterTree obj_;
201 return obj_;
202 }
203};
204
206template<class TypeTag>
207struct ModelParameterGroup<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
208
210template<class TypeTag>
211struct GridFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
212
213#if HAVE_DUNE_FEM
214template<class TypeTag>
215struct GridPart<TypeTag, TTag::NumericModel>
216{
218 using type = Dune::Fem::AdaptiveLeafGridPart<Grid>;
219};
220
221template<class TypeTag>
222struct GridView<TypeTag, TTag::NumericModel> { using type = typename GetPropType<TypeTag, Properties::GridPart>::GridViewType; };
223#else
228template<class TypeTag>
229struct GridView<TypeTag, TTag::NumericModel> { using type = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView; };
230#endif
231
233template<class TypeTag>
234struct ParameterFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
235
238template<class TypeTag>
239struct GridGlobalRefinements<TypeTag, TTag::NumericModel> { static constexpr unsigned value = 0; };
240
242template<class TypeTag>
243struct PrintProperties<TypeTag, TTag::NumericModel> { static constexpr int value = 2; };
244
246template<class TypeTag>
247struct PrintParameters<TypeTag, TTag::NumericModel> { static constexpr int value = 2; };
248
250template<class TypeTag>
251struct EndTime<TypeTag, TTag::NumericModel>
252{
254 static constexpr type value = -1e35;
255};
256
258template<class TypeTag>
259struct InitialTimeStepSize<TypeTag, TTag::NumericModel>
260{
262 static constexpr type value = -1e35;
263};
264
266template<class TypeTag>
267struct RestartTime<TypeTag, TTag::NumericModel>
268{
270 static constexpr type value = -1e35;
271};
272
274template<class TypeTag>
275struct PredeterminedTimeStepsFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
276
277
278} // namespace Opm::Properties
279
280#endif
Definition: blackoilmodel.hh:72
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:242
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:182
grid resolution
Definition: basicproperties.hh:157
Definition: basicproperties.hh:159
Definition: basicproperties.hh:161
domain size
Definition: basicproperties.hh:149
Definition: basicproperties.hh:151
Definition: basicproperties.hh:153
GetPropType< TypeTag, Scalar > type
Definition: basicproperties.hh:253
The default value for the simulation's end time.
Definition: basicproperties.hh:133
name of the grid file
Definition: basicproperties.hh:165
Definition: basicproperties.hh:106
The type of the DUNE grid.
Definition: basicproperties.hh:93
typename GetPropType< TypeTag, Properties::Grid >::LeafGridView type
Definition: basicproperties.hh:229
level of the grid view
Definition: basicproperties.hh:169
Definition: basicproperties.hh:96
UndefinedProperty type
Definition: basicproperties.hh:96
GetPropType< TypeTag, Scalar > type
Definition: basicproperties.hh:261
The default value for the simulation's initial time step size.
Definition: basicproperties.hh:137
Property which defines the group that is queried for parameters by default.
Definition: basicproperties.hh:85
The type of the model.
Definition: basicproperties.hh:81
Number of equations in the system of PDEs.
Definition: basicproperties.hh:73
Definition: basicproperties.hh:111
Dune::ParameterTree type
Definition: basicproperties.hh:196
static Dune::ParameterTree & tree()
Definition: basicproperties.hh:198
Property which provides a Dune::ParameterTree.
Definition: basicproperties.hh:77
The name of the file with a number of forced time step lengths.
Definition: basicproperties.hh:145
Print all parameters on startup?
Definition: basicproperties.hh:129
Print all properties on startup?
Definition: basicproperties.hh:120
GetPropType< TypeTag, Scalar > type
Definition: basicproperties.hh:269
The default value for the simulation's restart time.
Definition: basicproperties.hh:141
double type
Definition: basicproperties.hh:190
Property to specify the type of scalar values.
Definition: basicproperties.hh:69
Manages the simulation time.
Definition: basicproperties.hh:173
Type tag for all fully coupled models.
Definition: basicproperties.hh:58
std::tuple< NumericModel > InheritsFrom
Definition: basicproperties.hh:58
Type tag for all models.
Definition: basicproperties.hh:55
std::tuple< ParameterSystem > InheritsFrom
Definition: basicproperties.hh:55
a tag to mark properties as undefined
Definition: propertysystem.hh:40
Property which provides a Vanguard (manages grids)
Definition: basicproperties.hh:89