subcontrolvolumeface.hh 5.01 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.
32
template<MpfaMethods M, class ScvfGeometryTraits>
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
 */
46
47
template<MpfaMethods M, class ScvfGeometryTraits>
class CCMpfaSubControlVolumeFace : public CCMpfaSubControlVolumeFaceImplementation<M, ScvfGeometryTraits>
48
{
49
50
51
52
53
54
55
    using ParentType = CCMpfaSubControlVolumeFaceImplementation<M, ScvfGeometryTraits>;
    using Geometry = typename ScvfGeometryTraits::Geometry;
    using GlobalPosition = typename ScvfGeometryTraits::GlobalPosition;
    using GridIndexType = typename ScvfGeometryTraits::GridIndexType;
    using LocalIndexType = typename ScvfGeometryTraits::LocalIndexType;
    using Scalar = typename ScvfGeometryTraits::Scalar;
    using CornerStorage = typename ScvfGeometryTraits::CornerStorage;
56
57

public:
Dennis Gläser's avatar
Dennis Gläser committed
58
    //! state the traits class puclicly
59
    using Traits = ScvfGeometryTraits;
Dennis Gläser's avatar
Dennis Gläser committed
60

61
    /*!
62
     * \brief Constructor
63
64
65
66
67
     *
     * \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
68
     * \param localIndex Some element local index (e.g. the local vertex index in mpfa-o-fps scheme)
69
     * \param scvfIndex The global index of this scv face
70
71
     * \param insideScvIdx The inside scv index connected to this face
     * \param outsideScvIndices The outside scv indices connected to this face
72
73
74
     * \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
     */
75
76
    template<class MpfaHelper>
    CCMpfaSubControlVolumeFace(const MpfaHelper& helper,
77
                               CornerStorage&& corners,
78
                               GlobalPosition&& unitOuterNormal,
79
80
81
82
83
                               GridIndexType vIdxGlobal,
                               LocalIndexType localIndex,
                               GridIndexType scvfIndex,
                               GridIndexType insideScvIdx,
                               const std::vector<GridIndexType>& outsideScvIndices,
84
                               Scalar q,
85
                               bool boundary)
86
    : ParentType(helper,
87
                 std::forward<CornerStorage>(corners),
88
89
90
91
92
93
94
95
                 std::forward<GlobalPosition>(unitOuterNormal),
                 vIdxGlobal,
                 localIndex,
                 scvfIndex,
                 insideScvIdx,
                 outsideScvIndices,
                 q,
                 boundary)
96
    {}
97
};
98
99

} // end namespace Dumux
100

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

106
#endif