properties.hh 3.81 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 tag and some properties for models using the box scheme.
 */

#ifndef DUMUX_BOX_PROPERTIES_HH
#define DUMUX_BOX_PROPERTIES_HH

Dennis Gläser's avatar
Dennis Gläser committed
29
30
31
#include <dune/common/fvector.hh>
#include <dune/geometry/multilineargeometry.hh>

32
#include <dumux/common/properties.hh>
Timo Koch's avatar
Timo Koch committed
33
34
#include <dumux/common/boundaryflag.hh>

35
36
#include <dumux/assembly/boxlocalresidual.hh>

37
#include <dumux/discretization/method.hh>
38
39
#include <dumux/discretization/fvproperties.hh>

40
#include <dumux/discretization/box/elementsolution.hh>
41
#include <dumux/discretization/box/elementboundarytypes.hh>
42
#include <dumux/discretization/box/gridfluxvariablescache.hh>
43
#include <dumux/discretization/box/gridvolumevariables.hh>
44
45
#include <dumux/discretization/box/fvgridgeometry.hh>

46
47
48
namespace Dumux {
namespace Properties {

49
50
51
//! Type tag for the box scheme.
NEW_TYPE_TAG(BoxModel, INHERITS_FROM(FiniteVolumeModel));

52
53
//! Set the default for the global finite volume geometry
SET_PROP(BoxModel, FVGridGeometry)
54
55
{
private:
56
57
58
    static constexpr bool enableCache = GET_PROP_VALUE(TypeTag, EnableFVGridGeometryCache);
    using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
    using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
59
public:
60
    using type = BoxFVGridGeometry<Scalar, GridView, enableCache>;
61
62
};

63
64
65
66
67
68
69
70
71
72
//! The grid volume variables vector class
SET_PROP(BoxModel, GridVolumeVariables)
{
private:
    static constexpr bool enableCache = GET_PROP_VALUE(TypeTag, EnableGridVolumeVariablesCache);
    using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
    using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
public:
    using type = BoxGridVolumeVariables<Problem, VolumeVariables, enableCache>;
};
73

74
75
76
77
78
79
80
81
82
83
//! The grid flux variables cache vector class
SET_PROP(BoxModel, GridFluxVariablesCache)
{
private:
    static constexpr bool enableCache = GET_PROP_VALUE(TypeTag, EnableGridFluxVariablesCache);
    using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
    using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache);
public:
    using type = BoxGridFluxVariablesCache<Problem, FluxVariablesCache, enableCache>;
};
84

85
86
//! Set the default for the ElementBoundaryTypes
SET_TYPE_PROP(BoxModel, ElementBoundaryTypes, BoxElementBoundaryTypes<typename GET_PROP_TYPE(TypeTag, BoundaryTypes)>);
87
88
89
90
91
92
93
94

//! Set the BaseLocalResidual to BoxLocalResidual
SET_TYPE_PROP(BoxModel, BaseLocalResidual, BoxLocalResidual<TypeTag>);

} // namespace Properties
} // namespace Dumux

#endif