diffusivepart.hh 4.98 KB
Newer Older
1
2
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
3
4
5
/*****************************************************************************
 *   Copyright (C) 2007-2009 by Bernd Flemisch                               *
 *   Copyright (C) 2008-2009 by Markus Wolff                                 *
Andreas Lauser's avatar
Andreas Lauser committed
6
 *   Institute for Modelling Hydraulic and Environmental Systems             *
7
8
9
 *   University of Stuttgart, Germany                                        *
 *   email: <givenname>.<name>@iws.uni-stuttgart.de                          *
 *                                                                           *
10
 *   This program is free software: you can redistribute it and/or modify    *
11
 *   it under the terms of the GNU General Public License as published by    *
12
13
 *   the Free Software Foundation, either version 2 of the License, or       *
 *   (at your option) any later version.                                     *
14
 *                                                                           *
15
16
17
18
19
20
21
 *   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/>.   *
22
23
24
25
 *****************************************************************************/
#ifndef DUMUX_DIFFUSIVEPART_HH
#define DUMUX_DIFFUSIVEPART_HH

26
#include <dumux/decoupled/2p/transport/transportproperties2p.hh>
Bernd Flemisch's avatar
Bernd Flemisch committed
27

28
29
30
31
32
33
34
/**
 * @file
 * @brief  Base class for defining the diffusive part of an advection-diffusion equation
 * @author Bernd Flemisch, Markus Wolff
 */
namespace Dumux
{
Markus Wolff's avatar
Markus Wolff committed
35
/*!\ingroup Saturation2p
36
37
 * @brief  Base class for defining the diffusive part of an advection-diffusion equation
 *
38
 * @tparam TypeTag The Type Tag
39
40
41
42
43
 */
template<class TypeTag>
class DiffusivePart
{
private:
44
45
46
    typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
      typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
      typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
47
48
49

    enum{dim = GridView::dimension};
    typedef typename GridView::Traits::template Codim<0>::Entity Element;
50
    typedef typename GridView::Intersection Intersection;
51
52
53
54
55
56
57
58
59
60
61
62
    typedef Dune::FieldVector<Scalar, dim> FieldVector;

public:
    //! Returns diffusive term
    /*! Returns diffusive term for current element face
     *  @param[in] element        entity of codim 0
     *  @param[in] indexInInside  face index in reference element
     *  @param[in] satI           saturation of current element
     *  @param[in] satJ           saturation of neighbor element
     *  @param[in] pcGradient     gradient of capillary pressure between element I and J
     *  \return     diffusive term of an advection-diffusion equation
     */
63
64
    void getFlux(FieldVector& flux, const Intersection& intersection, Scalar satI, Scalar satJ, const FieldVector& pcGradient) const
    {}
65
66
67
68
69
70

    //! Returns diffusive term
    /*! Returns diffusive term for current element face
     *  @param[in] element          entity of codim 0
     *  @param[in] indexInInside    face index in reference element
     *  @param[in] satIntersection  saturation at the face between element I and J
Felix Bode's avatar
Felix Bode committed
71
     *  @param[in] satGradient       gradient of saturation between element I and J
72
73
74
     *  @param[in] time             time
     *  \return     diffusive term of an advection-diffusion equation
     */
75
    void getFlux(FieldVector& flux, const Intersection& intersection,
76
                                    const Scalar satIntersection, const FieldVector& satGradient, const Scalar time) const
77
    {}
78
79
80
81
82
83

    //! Returns diffusive term
    /*! Returns diffusive term for current element face
     *  @param[in] element          entity of codim 0
     *  @param[in] indexInInside    face index in reference element
     *  @param[in] satIntersection  saturation at the face between element I and J
Felix Bode's avatar
Felix Bode committed
84
     *  @param[in] satGradient       gradient of saturation between element I and J
85
86
87
88
89
     *  @param[in] time             time
     *  @param[in] satI             saturation of current element
     *  @param[in] satJ             saturation of neighbor element
     *  \return     diffusive term of an advection-diffusion equation
     */
90
    void getFlux(FieldVector& flux, const Intersection& intersection,
91
92
                                    const Scalar satIntersection, const FieldVector& satGradient, const Scalar time,
                                    Scalar satI, Scalar satJ) const
93
    {}
94
95


96
97
98
99
    //! The constructor
    /*
     *  \param problem object including the problem definition
     */
100
101
102
103
104
105
106
107
108
    DiffusivePart(Problem& problem)
    {}
    //! always define virtual destructor in abstract base class
    ~DiffusivePart()
    { }
};
}

#endif