GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/discretization/cellcentered/mpfa/localfacedata.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 16 16 100.0%
Functions: 0 0 -%
Branches: 19 26 73.1%

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-FileCopyrightText: 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 40748288 InteractionVolumeLocalFaceData(LocalIndexType faceIndex,
43 LocalIndexType scvIndex,
44 GridIndexType gridScvfIndex)
45 40590780 : ivLocalScvfIndex_(faceIndex)
46 40590780 , ivLocalInsideScvIndex_(scvIndex)
47 40590780 , gridScvfIndex_(gridScvfIndex)
48
0/2
✗ Branch 0 not taken.
✗ Branch 1 not taken.
40590780 , isOutside_(false)
49 {}
50
51 //! Constructor for "outside" faces
52 35288710 InteractionVolumeLocalFaceData(LocalIndexType faceIndex,
53 LocalIndexType scvIndex,
54 LocalIndexType indexInScvfOutsideFaces,
55 GridIndexType gridScvfIndex)
56 35109986 : ivLocalScvfIndex_(faceIndex)
57 35109986 , ivLocalInsideScvIndex_(scvIndex)
58 35109986 , scvfLocalOutsideScvfIndex_(indexInScvfOutsideFaces)
59 35109986 , gridScvfIndex_(gridScvfIndex)
60
0/2
✗ Branch 0 not taken.
✗ Branch 1 not taken.
35109986 , isOutside_(true)
61 {}
62
63 // Functions to return stored data
64
4/4
✓ Branch 0 taken 13254458 times.
✓ Branch 1 taken 17342694 times.
✓ Branch 2 taken 68631250 times.
✓ Branch 3 taken 67581854 times.
490725962 LocalIndexType ivLocalScvfIndex() const { return ivLocalScvfIndex_; }
65
3/6
✗ Branch 1 not taken.
✓ Branch 2 taken 1885144 times.
✓ Branch 4 taken 105952 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 189060 times.
834121126 LocalIndexType ivLocalInsideScvIndex() const { return ivLocalInsideScvIndex_; }
66 191878592 LocalIndexType scvfLocalOutsideScvfIndex() const { assert(isOutside_); return scvfLocalOutsideScvfIndex_; }
67
2/2
✓ Branch 1 taken 68631250 times.
✓ Branch 2 taken 67581854 times.
380733078 GridIndexType gridScvfIndex() const { return gridScvfIndex_; }
68
10/10
✓ Branch 0 taken 14949558 times.
✓ Branch 1 taken 15647594 times.
✓ Branch 2 taken 13664582 times.
✓ Branch 3 taken 11226042 times.
✓ Branch 4 taken 91999042 times.
✓ Branch 5 taken 89219526 times.
✓ Branch 6 taken 70586848 times.
✓ Branch 7 taken 69849584 times.
✓ Branch 8 taken 7659818 times.
✓ Branch 9 taken 8974686 times.
1058877918 bool isOutsideFace() const { return isOutside_; }
69 };
70
71 } // end namespace Dumux
72
73 #endif
74