3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
localfacedata.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
25#ifndef DUMUX_DISCRETIZATION_CC_MPFA_LOCAL_FACE_DATA_HH
26#define DUMUX_DISCRETIZATION_CC_MPFA_LOCAL_FACE_DATA_HH
27
28#include <cassert>
29
30namespace Dumux {
31
40template< class GridIndexType, class LocalIndexType >
42{
43 LocalIndexType ivLocalScvfIndex_;
44 LocalIndexType ivLocalInsideScvIndex_;
45 LocalIndexType scvfLocalOutsideScvfIndex_;
46 GridIndexType gridScvfIndex_;
47 bool isOutside_;
48
49public:
52
54 InteractionVolumeLocalFaceData(LocalIndexType faceIndex,
55 LocalIndexType scvIndex,
56 GridIndexType gridScvfIndex)
57 : ivLocalScvfIndex_(faceIndex)
58 , ivLocalInsideScvIndex_(scvIndex)
59 , gridScvfIndex_(gridScvfIndex)
60 , isOutside_(false)
61 {}
62
64 InteractionVolumeLocalFaceData(LocalIndexType faceIndex,
65 LocalIndexType scvIndex,
66 LocalIndexType indexInScvfOutsideFaces,
67 GridIndexType gridScvfIndex)
68 : ivLocalScvfIndex_(faceIndex)
69 , ivLocalInsideScvIndex_(scvIndex)
70 , scvfLocalOutsideScvfIndex_(indexInScvfOutsideFaces)
71 , gridScvfIndex_(gridScvfIndex)
72 , isOutside_(true)
73 {}
74
75 // Functions to return stored data
76 LocalIndexType ivLocalScvfIndex() const { return ivLocalScvfIndex_; }
77 LocalIndexType ivLocalInsideScvIndex() const { return ivLocalInsideScvIndex_; }
78 LocalIndexType scvfLocalOutsideScvfIndex() const { assert(isOutside_); return scvfLocalOutsideScvfIndex_; }
79 GridIndexType gridScvfIndex() const { return gridScvfIndex_; }
80 bool isOutsideFace() const { return isOutside_; }
81};
82
83} // end namespace Dumux
84
85#endif
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
General implementation of a data structure holding interaction volume-local information for a grid su...
Definition: localfacedata.hh:42
LocalIndexType ivLocalInsideScvIndex() const
Definition: localfacedata.hh:77
bool isOutsideFace() const
Definition: localfacedata.hh:80
InteractionVolumeLocalFaceData(LocalIndexType faceIndex, LocalIndexType scvIndex, LocalIndexType indexInScvfOutsideFaces, GridIndexType gridScvfIndex)
Constructor for "outside" faces.
Definition: localfacedata.hh:64
InteractionVolumeLocalFaceData()=default
Default constructor.
InteractionVolumeLocalFaceData(LocalIndexType faceIndex, LocalIndexType scvIndex, GridIndexType gridScvfIndex)
Constructor.
Definition: localfacedata.hh:54
LocalIndexType ivLocalScvfIndex() const
Definition: localfacedata.hh:76
GridIndexType gridScvfIndex() const
Definition: localfacedata.hh:79
LocalIndexType scvfLocalOutsideScvfIndex() const
Definition: localfacedata.hh:78