model.hh 3 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
28
#include <dune/common/fvector.hh>

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

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

36
37
38
namespace Dumux {
namespace Properties {

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

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

45
46
47
48
49
//! 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));
50
51

//! use the global group as default for the model's parameter group
52
SET_STRING_PROP(ModelProperties, ModelParameterGroup, "");
53
54

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

//! Set the default to a function throwing a NotImplemented error
61
SET_TYPE_PROP(ModelProperties, VtkOutputFields, DefaultVtkOutputFields);
62
63

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

} // namespace Properties
} // namespace Dumux

#endif