version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
13#ifndef DUMUX_DISCRETIZATION_CC_MPFA_LOCAL_FACE_DATA_HH
14#define DUMUX_DISCRETIZATION_CC_MPFA_LOCAL_FACE_DATA_HH
15
16#include <cassert>
17
18namespace Dumux {
19
28template< class GridIndexType, class LocalIndexType >
30{
31 LocalIndexType ivLocalScvfIndex_;
32 LocalIndexType ivLocalInsideScvIndex_;
33 LocalIndexType scvfLocalOutsideScvfIndex_;
34 GridIndexType gridScvfIndex_;
35 bool isOutside_;
36
37public:
40
42 InteractionVolumeLocalFaceData(LocalIndexType faceIndex,
43 LocalIndexType scvIndex,
44 GridIndexType gridScvfIndex)
45 : ivLocalScvfIndex_(faceIndex)
46 , ivLocalInsideScvIndex_(scvIndex)
47 , gridScvfIndex_(gridScvfIndex)
48 , isOutside_(false)
49 {}
50
52 InteractionVolumeLocalFaceData(LocalIndexType faceIndex,
53 LocalIndexType scvIndex,
54 LocalIndexType indexInScvfOutsideFaces,
55 GridIndexType gridScvfIndex)
56 : ivLocalScvfIndex_(faceIndex)
57 , ivLocalInsideScvIndex_(scvIndex)
58 , scvfLocalOutsideScvfIndex_(indexInScvfOutsideFaces)
59 , gridScvfIndex_(gridScvfIndex)
60 , isOutside_(true)
61 {}
62
63 // Functions to return stored data
64 LocalIndexType ivLocalScvfIndex() const { return ivLocalScvfIndex_; }
65 LocalIndexType ivLocalInsideScvIndex() const { return ivLocalInsideScvIndex_; }
66 LocalIndexType scvfLocalOutsideScvfIndex() const { assert(isOutside_); return scvfLocalOutsideScvfIndex_; }
67 GridIndexType gridScvfIndex() const { return gridScvfIndex_; }
68 bool isOutsideFace() const { return isOutside_; }
69};
70
71} // end namespace Dumux
72
73#endif
General implementation of a data structure holding interaction volume-local information for a grid su...
Definition: localfacedata.hh:30
LocalIndexType ivLocalInsideScvIndex() const
Definition: localfacedata.hh:65
bool isOutsideFace() const
Definition: localfacedata.hh:68
InteractionVolumeLocalFaceData(LocalIndexType faceIndex, LocalIndexType scvIndex, LocalIndexType indexInScvfOutsideFaces, GridIndexType gridScvfIndex)
Constructor for "outside" faces.
Definition: localfacedata.hh:52
InteractionVolumeLocalFaceData()=default
Default constructor.
InteractionVolumeLocalFaceData(LocalIndexType faceIndex, LocalIndexType scvIndex, GridIndexType gridScvfIndex)
Constructor.
Definition: localfacedata.hh:42
LocalIndexType ivLocalScvfIndex() const
Definition: localfacedata.hh:64
GridIndexType gridScvfIndex() const
Definition: localfacedata.hh:67
LocalIndexType scvfLocalOutsideScvfIndex() const
Definition: localfacedata.hh:66
Definition: adapt.hh:17