diffusivepart.hh 5.07 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
6
7
8
9
/*****************************************************************************
 *   Copyright (C) 2007-2009 by Bernd Flemisch                               *
 *   Copyright (C) 2008-2009 by Markus Wolff                                 *
 *   Institute of Hydraulic Engineering                                      *
 *   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
26
27
28
29
30
31
32
 *****************************************************************************/
#ifndef DUMUX_DIFFUSIVEPART_HH
#define DUMUX_DIFFUSIVEPART_HH

/**
 * @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
33
/*!\ingroup Saturation2p
34
35
 * @brief  Base class for defining the diffusive part of an advection-diffusion equation
 *
36
 * @tparam TypeTag The Type Tag
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
 */
template<class TypeTag>
class DiffusivePart
{
private:
    typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
      typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
      typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem;

    enum{dim = GridView::dimension};
    typedef typename GridView::Traits::template Codim<0>::Entity Element;
    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
     */
    FieldVector operator() (const Element& element, const int indexInInside, Scalar satI, Scalar satJ, const FieldVector& pcGradient) const
    {
        FieldVector trivial(0);
        return trivial;
    }

    //! 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
75
76
77
78
79
80
81
82
83
84
85
86
     *  @param[in] time             time
     *  \return     diffusive term of an advection-diffusion equation
     */
    FieldVector operator() (const Element& element, const int indexInInside,
                                    const Scalar satIntersection, const FieldVector& satGradient, const Scalar time) const
    {
        FieldVector trivial(0);
        return trivial;
    }

    //! 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
87
     *  @param[in] satGradient       gradient of saturation between element I and J
88
89
90
91
92
93
94
95
96
97
98
99
100
101
     *  @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
     */
    FieldVector operator() (const Element& element, const int indexInInside,
                                    const Scalar satIntersection, const FieldVector& satGradient, const Scalar time,
                                    Scalar satI, Scalar satJ) const
    {
        FieldVector trivial(0);
        return trivial;
    }


102
103
104
105
    //! The constructor
    /*
     *  \param problem object including the problem definition
     */
106
107
108
109
110
111
112
113
114
    DiffusivePart(Problem& problem)
    {}
    //! always define virtual destructor in abstract base class
    ~DiffusivePart()
    { }
};
}

#endif