GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/discretization/cellcentered/mpfa/localfacedata.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 4 9 44.4%
Functions: 0 5 0.0%
Branches: 0 8 0.0%

Line Branch Exec Source
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 //
7 /*!
8 * \file
9 * \ingroup CCMpfaDiscretization
10 * \brief Data structure holding interaction volume-local information for
11 * a grid subb-control volume face embedded in it.
12 */
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
18 namespace Dumux {
19
20 /*!
21 * \ingroup CCMpfaDiscretization
22 * \brief General implementation of a data structure holding interaction
23 * volume-local information for a grid sub-control volume face embedded in it.
24 *
25 * \tparam GridIndexType The type used for indices on the grid
26 * \tparam LocalIndexType The type used for indices inside interaction volumes
27 */
28 template< class GridIndexType, class LocalIndexType >
29 class InteractionVolumeLocalFaceData
30 {
31 LocalIndexType ivLocalScvfIndex_; //!< the iv-local scvf index this scvf maps to
32 LocalIndexType ivLocalInsideScvIndex_; //!< the iv-local index of the scvfs' inside scv
33 LocalIndexType scvfLocalOutsideScvfIndex_; //!< the index of this scvf in the scvf-local outside faces
34 GridIndexType gridScvfIndex_; //!< the index of the corresponding global scvf
35 bool isOutside_; //!< indicates if this face is an "outside" face in the iv-local system
36
37 public:
38 //! Default constructor
39 InteractionVolumeLocalFaceData() = default;
40
41 //! Constructor
42 39881298 InteractionVolumeLocalFaceData(LocalIndexType faceIndex,
43 LocalIndexType scvIndex,
44 GridIndexType gridScvfIndex)
45 : ivLocalScvfIndex_(faceIndex)
46 , ivLocalInsideScvIndex_(scvIndex)
47 , gridScvfIndex_(gridScvfIndex)
48
0/4
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
39881298 , isOutside_(false)
49 {}
50
51 //! Constructor for "outside" faces
52 34481764 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
0/2
✗ Branch 0 not taken.
✗ Branch 1 not taken.
34481764 , 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
74