subcontrolvolumeface.hh 4.99 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
Dennis Gläser's avatar
Dennis Gläser committed
21
 * \brief Class for the sub-control volume face in mpfa schemes
22
23
24
25
 */
#ifndef DUMUX_DISCRETIZATION_CC_MPFA_SUBCONTROLVOLUMEFACE_HH
#define DUMUX_DISCRETIZATION_CC_MPFA_SUBCONTROLVOLUMEFACE_HH

26
#include "methods.hh"
27
28
29

namespace Dumux
{
30
31
//! Forward declaration of the method specific implementations
//! Available implementations have to be included at the end of this file.
Dennis Gläser's avatar
Dennis Gläser committed
32
template<MpfaMethods M, class G, class GT, typename I>
33
class CCMpfaSubControlVolumeFaceImplementation;
34
35

/*!
Dennis Gläser's avatar
Dennis Gläser committed
36
 * \ingroup Mpfa
37
38
39
 * \brief Class for a sub control volume face in mpfa methods, i.e a part of the boundary
 *        of a control volume we compute fluxes on. This class inherits from the actual implementations
 *        and defines the constructor interface.
Dennis Gläser's avatar
Dennis Gläser committed
40
41
42
43
44
 *
 * \param M the mpfa method used
 * \param G the geometry type for the scvf geometries
 * \param GT the traits class for the geometry type
 * \param I the type used for indices
45
 */
Dennis Gläser's avatar
Dennis Gläser committed
46
47
template<MpfaMethods M, class G, class GT, typename I>
class CCMpfaSubControlVolumeFace : public CCMpfaSubControlVolumeFaceImplementation<M, G, GT, I>
48
{
Dennis Gläser's avatar
Dennis Gläser committed
49
    using ParentType = CCMpfaSubControlVolumeFaceImplementation<M, G, GT, I>;
50
51
52
53
54
    using Geometry = G;
    using IndexType = I;

    using Scalar = typename Geometry::ctype;
    static const int dim = Geometry::mydimension;
Dennis Gläser's avatar
Dennis Gläser committed
55
56
    static const int dimWorld = Geometry::coorddimension;
    using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
57
58

public:
Dennis Gläser's avatar
Dennis Gläser committed
59
60
61
62
63
64
    //! state the traits class puclicly
    using Traits = GT;

    //! For convenience, state the corner storage vector from the traits
    using CornerVector = typename Traits::template CornerStorage<dim, dimWorld>::Type;

65
    /*!
66
     * \brief Constructor
67
68
69
70
71
     *
     * \param geomHelper The mpfa geometry helper
     * \param corners The corners of the scv face
     * \param unitOuterNormal The unit outer normal vector of the scvf
     * \param vIdxGlobal The global vertex index the scvf is connected to
Dennis Gläser's avatar
Dennis Gläser committed
72
     * \param localIndex Some element local index (e.g. the local vertex index in mpfa-o-fps scheme)
73
     * \param scvfIndex The global index of this scv face
74
75
     * \param insideScvIdx The inside scv index connected to this face
     * \param outsideScvIndices The outside scv indices connected to this face
76
77
78
     * \param q The parameterization of the quadrature point on the scvf for flux calculation
     * \param boundary Boolean to specify whether or not the scvf is on a boundary
     */
79
80
    template<class MpfaHelper>
    CCMpfaSubControlVolumeFace(const MpfaHelper& helper,
Dennis Gläser's avatar
Dennis Gläser committed
81
                               CornerVector&& corners,
82
                               GlobalPosition&& unitOuterNormal,
83
84
                               IndexType vIdxGlobal,
                               unsigned int localIndex,
85
                               IndexType scvfIndex,
86
87
                               IndexType insideScvIdx,
                               const std::vector<IndexType>& outsideScvIndices,
88
                               Scalar q,
89
                               bool boundary)
90
    : ParentType(helper,
Dennis Gläser's avatar
Dennis Gläser committed
91
                 std::forward<CornerVector>(corners),
92
93
94
95
96
97
98
99
                 std::forward<GlobalPosition>(unitOuterNormal),
                 vIdxGlobal,
                 localIndex,
                 scvfIndex,
                 insideScvIdx,
                 outsideScvIndices,
                 q,
                 boundary)
100
    {}
101
102
103
};
} // end namespace

104
//! The available implementations should be included here
Dennis Gläser's avatar
Dennis Gläser committed
105
// #include <dumux/discretization/cellcentered/mpfa/lmethod/subcontrolvolumeface.hh>
106
#include <dumux/discretization/cellcentered/mpfa/omethod/subcontrolvolumeface.hh>
Dennis Gläser's avatar
Dennis Gläser committed
107
// #include <dumux/discretization/cellcentered/mpfa/omethodfps/subcontrolvolumeface.hh>
108

109
#endif