model.hh 3.15 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// -*- 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/>.   *
 *****************************************************************************/
/*!
 * \file
21
22
 * \ingroup Properties
 * \brief Defines a type tags and some fundamental properties for all models
23
 */
Timo Koch's avatar
Timo Koch committed
24
25
#ifndef DUMUX_MODEL_PROPERTIES_HH
#define DUMUX_MODEL_PROPERTIES_HH
26

27
#include <dune/common/fvector.hh>
28
#include <dune/common/deprecated.hh>
29

30
#include <dumux/common/properties.hh>
Timo Koch's avatar
Timo Koch committed
31
#include <dumux/common/balanceequationopts.hh>
32
#include <dumux/io/defaultiofields.hh>
33

Timo Koch's avatar
Timo Koch committed
34
// Forward declaration
35
namespace Dune { class ParameterTree; }
36

37
38
39
namespace Dumux {
namespace Properties {

40
//! Type tag for numeric models.
41
NEW_TYPE_TAG(ModelProperties);
42
43

//! Set the default type of scalar values to double
44
SET_TYPE_PROP(ModelProperties, Scalar, double);
45

46
//! Set the default vector with size number of equations to a field vector
47
SET_TYPE_PROP(ModelProperties, NumEqVector, Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar), GET_PROP_TYPE(TypeTag, ModelTraits)::numEq()>);
48
49
50

//! 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));
51
52

//! do not specific any model-specific default parameters here
53
SET_PROP(ModelProperties, ModelDefaultParameters)
54
55
56
57
{
    static void defaultParams(Dune::ParameterTree& tree, const std::string& group = "") { }
};

58
59
60
61
62
63
64
//! \todo this property is deprecated use IOFields instead!
SET_PROP(ModelProperties, VtkOutputFields) {
    using type DUNE_DEPRECATED_MSG("This property is deprecated use property IOFields instead") = typename GET_PROP_TYPE(TypeTag, IOFields);
};

//! Set the default to an implementation throwing a NotImplemented error
SET_TYPE_PROP(ModelProperties, IOFields, DefaultIOFields);
65
66

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

} // namespace Properties
} // namespace Dumux

#endif