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  Copyright (C) 2010-2013 by Andreas Lauser
5  Copyright (C) 2011 by Bernd Flemisch
6 
7  This file is part of the Open Porous Media project (OPM).
8 
9  OPM is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 2 of the License, or
12  (at your option) any later version.
13 
14  OPM is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OPM. If not, see <http://www.gnu.org/licenses/>.
21 */
27 #ifndef EWOMS_BASIC_PROPERTIES_HH
28 #define EWOMS_BASIC_PROPERTIES_HH
29 
30 #include <dune/common/parametertree.hh>
31 
35 
36 namespace Ewoms {
37 namespace Properties {
39 // Type tag definitions:
40 //
41 // NumericModel
42 // |
43 // +-> ImplicitModel
45 
47 NEW_TYPE_TAG(NumericModel, INHERITS_FROM(ParameterSystem));
48 
50 NEW_TYPE_TAG(ImplicitModel, INHERITS_FROM(NumericModel));
51 
53 // Property names which are always available:
54 //
55 // Scalar
57 
59 NEW_PROP_TAG(Scalar);
60 
62 NEW_PROP_TAG(ParameterTree);
63 
65 NEW_PROP_TAG(ModelParameterGroup);
66 
68 NEW_PROP_TAG(GridManager);
69 
72 NEW_PROP_TAG(GridFile);
73 
76 NEW_PROP_TAG(GridGlobalRefinements);
77 
80 NEW_PROP_TAG(ParameterFile);
81 
88 NEW_PROP_TAG(PrintProperties);
89 
96 NEW_PROP_TAG(PrintParameters);
97 
99 NEW_PROP_TAG(EndTime);
100 
102 NEW_PROP_TAG(InitialTimeStepSize);
103 
105 NEW_PROP_TAG(RestartTime);
106 
108 // Default values for properties:
109 //
110 // Scalar -> double
112 
114 SET_TYPE_PROP(NumericModel, Scalar, double);
115 
117 SET_PROP(NumericModel, ParameterTree)
118 {
119  typedef Dune::ParameterTree type;
120 
121  static Dune::ParameterTree &tree()
122  {
123  static Dune::ParameterTree obj_;
124  return obj_;
125  }
126 };
127 
129 SET_STRING_PROP(NumericModel, ModelParameterGroup, "");
130 
132 SET_TYPE_PROP(NumericModel, GridManager, Ewoms::DgfGridManager<TypeTag>);
133 
135 SET_STRING_PROP(NumericModel, GridFile, "");
136 
141 SET_TYPE_PROP(NumericModel, GridView, typename GET_PROP_TYPE(TypeTag, Grid)::LeafGridView);
142 
144 SET_STRING_PROP(NumericModel, ParameterFile, "");
145 
148 SET_INT_PROP(NumericModel, GridGlobalRefinements, 0);
149 
151 SET_INT_PROP(NumericModel, PrintProperties, 2);
152 
154 SET_INT_PROP(NumericModel, PrintParameters, 2);
155 
157 SET_SCALAR_PROP(NumericModel, EndTime, -1e100);
158 
160 SET_SCALAR_PROP(NumericModel, InitialTimeStepSize, -1e100);
161 
163 SET_SCALAR_PROP(NumericModel, RestartTime, -1e100);
164 
165 } // namespace Properties
166 } // namespace Ewoms
167 
168 #endif
Provides a grid manager which reads Dune Grid Format (DGF) files.
Definition: dgfgridmanager.hh:53
SET_SCALAR_PROP(NumericModel, EndTime,-1e100)
The default value for the simulation's end time.
Provides a grid manager which reads Dune Grid Format (DGF) files.
#define GET_PROP_TYPE(TypeTag, PropTagName)
Access the type attribute of a property for a type tag.
Definition: propertysystem.hh:485
SET_PROP(NumericModel, ParameterTree)
Set the ParameterTree property.
Definition: basicproperties.hh:117
SET_INT_PROP(NumericModel, GridGlobalRefinements, 0)
NEW_PROP_TAG(Grid)
The type of the DUNE grid.
This file provides the infrastructure to retrieve run-time parameters.
SET_TYPE_PROP(NumericModel, Scalar, double)
Set the default type of scalar values to double.
Definition: baseauxiliarymodule.hh:35
NEW_TYPE_TAG(AuxModule)
Provides the magic behind the eWoms property system.
SET_STRING_PROP(NumericModel, ModelParameterGroup,"")
use the global group as default for the model's parameter group
#define INHERITS_FROM(...)
Syntactic sugar for NEW_TYPE_TAG.
Definition: propertysystem.hh:229