GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/experimental/discretization/gridvariables.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 5 5 100.0%
Functions: 3 3 100.0%
Branches: 20 64 31.2%

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 Experimental
10 * \ingroup Discretization
11 * \brief Base class for grid variables
12 */
13 #ifndef DUMUX_DISCRETIZATION_GRID_VARIABLES_HH
14 #define DUMUX_DISCRETIZATION_GRID_VARIABLES_HH
15
16 #include <utility>
17 #include <memory>
18
19 #include <dumux/experimental/common/variables.hh>
20
21 namespace Dumux::Experimental {
22
23 /*!
24 * \ingroup Experimental
25 * \ingroup Discretization
26 * \brief Base class for grid variables.
27 * \tparam GG The grid geometry type
28 * \tparam X The type used for solution vectors
29 */
30 template<class GG, class X>
31 class GridVariables
32 : public Variables<X>
33 {
34 using ParentType = Variables<X>;
35
36 public:
37 //! export the grid geometry type
38 using GridGeometry = GG;
39
40 /*!
41 * \brief Constructor from a grid geometry. The remaining arguments must
42 * be valid arguments for the construction of the Variables class.
43 */
44 template<class... Args>
45 8 GridVariables(std::shared_ptr<const GridGeometry> gridGeometry,
46 Args&&... args)
47 6 : ParentType(std::forward<Args>(args)...)
48
2/4
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
14 , gridGeometry_(gridGeometry)
49 4 {}
50
51 //! Return a reference to the grid geometry
52 const GridGeometry& gridGeometry() const
53
18/60
✓ Branch 1 taken 11 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 11 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 11 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 11 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 11 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 11 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 11 times.
✗ Branch 18 not taken.
✓ Branch 20 taken 11 times.
✗ Branch 21 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 1100 times.
✗ Branch 26 not taken.
✓ Branch 27 taken 1100 times.
✓ Branch 29 taken 11 times.
✗ Branch 30 not taken.
✓ Branch 32 taken 11 times.
✗ Branch 33 not taken.
✓ Branch 35 taken 11 times.
✗ Branch 36 not taken.
✓ Branch 38 taken 11 times.
✗ Branch 39 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 56 not taken.
✗ Branch 57 not taken.
✗ Branch 59 not taken.
✗ Branch 60 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 68 not taken.
✗ Branch 69 not taken.
✗ Branch 71 not taken.
✗ Branch 72 not taken.
✗ Branch 74 not taken.
✗ Branch 75 not taken.
✓ Branch 77 taken 11 times.
✗ Branch 78 not taken.
✓ Branch 80 taken 11 times.
✗ Branch 81 not taken.
✓ Branch 83 taken 11 times.
✗ Branch 84 not taken.
✓ Branch 86 taken 11 times.
✗ Branch 87 not taken.
4564 { return *gridGeometry_; }
54
55 private:
56 std::shared_ptr<const GridGeometry> gridGeometry_;
57 };
58
59 } // end namespace Dumux::Experimental
60
61 #endif
62