model.hh 3.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
 *   See the file COPYING for full copying permissions.                      *
 *                                                                           *
 *   This program is free software: you can redistribute it and/or modify    *
 *   it under the terms of the GNU General Public License as published by    *
 *   the Free Software Foundation, either version 2 of the License, or       *
 *   (at your option) any later version.                                     *
 *                                                                           *
 *   This program is distributed in the hope that it will be useful,         *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
 *   GNU General Public License for more details.                            *
 *                                                                           *
 *   You should have received a copy of the GNU General Public License       *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.   *
 *****************************************************************************/
/*!
 * \ingroup Properties
 * \file
 *
 * \brief Defines a type tags and some fundamental properties for
 *        all models
 */
#ifndef DUMUX_BASIC_PROPERTIES_HH
#define DUMUX_BASIC_PROPERTIES_HH

29
30
#include <dune/common/fvector.hh>

31
32
33
34
35
36
37
38
39
40
41
42
#include <dumux/common/balanceequationopts.hh>
#include <dumux/common/properties.hh>

#include <dumux/common/parameters.hh>
#include <dumux/io/defaultvtkoutputfields.hh>


namespace Dumux
{
namespace Properties
{
//! Type tag for numeric models.
43
NEW_TYPE_TAG(ModelProperties);
44
45

//! Set the default type of scalar values to double
46
SET_TYPE_PROP(ModelProperties, Scalar, double);
47
48

//! Set the default number of equations to one
49
50
51
52
53
54
55
SET_INT_PROP(ModelProperties, NumEq, 1);

//! Set the default vector with size number of equations to a field vector
SET_TYPE_PROP(ModelProperties, NumEqVector, Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar), GET_PROP_VALUE(TypeTag, NumEq)>);

//! Set the default primary variable vector to a vector of size of number of equations
SET_TYPE_PROP(ModelProperties, PrimaryVariables, typename GET_PROP_TYPE(TypeTag, NumEqVector));
56
57

//! use the global group as default for the model's parameter group
58
SET_STRING_PROP(ModelProperties, ModelParameterGroup, "");
59
60

//! do not specific any model-specific default parameters here
61
SET_PROP(ModelProperties, ModelDefaultParameters)
62
63
64
65
66
{
    static void defaultParams(Dune::ParameterTree& tree, const std::string& group = "") { }
};

//! Set the default to a function throwing a NotImplemented error
67
SET_TYPE_PROP(ModelProperties, VtkOutputFields, DefaultVtkOutputFields);
68
69

//! Set the default class for the balance equation options
70
SET_TYPE_PROP(ModelProperties, BalanceEqOpts, BalanceEquationOptions<TypeTag>);
71
72
73
74
75

} // namespace Properties
} // namespace Dumux

#endif