GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/1p/compressible/instationary/gridvariables.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 7 7 100.0%
Functions: 1 1 100.0%
Branches: 22 72 30.6%

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 OnePTests
10 * \brief Wrapper around the current FVGridVariables to fulfill the layout
11 * of the new grid variables to test grid variables-based assembly.
12 */
13 #ifndef DUMUX_COMPRESSIBLE_ONEP_TEST_GRID_VARIABLES_HH
14 #define DUMUX_COMPRESSIBLE_ONEP_TEST_GRID_VARIABLES_HH
15
16 #include <dumux/experimental/discretization/gridvariables.hh>
17
18 namespace Dumux::OnePCompressibleTest {
19
20 template<class GG, class BaseGridVariables, class SolutionVector>
21 class TestGridVariables
22 : public BaseGridVariables
23 , public Dumux::Experimental::GridVariables<GG, SolutionVector>
24 {
25 using ExperimentalBase = Dumux::Experimental::GridVariables<GG, SolutionVector>;
26
27 public:
28 // export some types to avoid ambiguity
29 using GridGeometry = GG;
30 using Scalar = typename BaseGridVariables::Scalar;
31
32 template<class Problem>
33 1 TestGridVariables(std::shared_ptr<Problem> problem,
34 std::shared_ptr<const GridGeometry> gridGeometry,
35 const SolutionVector& x)
36 : BaseGridVariables(problem, gridGeometry)
37
4/12
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
4 , ExperimentalBase(gridGeometry, x)
38 {
39 1 BaseGridVariables::init(x);
40 1 }
41
42 // update to a new solution
43 void update(const SolutionVector& x)
44 {
45 53 BaseGridVariables::update(x);
46 53 ExperimentalBase::update(x);
47 }
48
49 // overload some functions to avoid ambiguity
50 decltype(auto) gridGeometry() const
51
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.
4556 { return ExperimentalBase::gridGeometry(); }
52 };
53
54 } // end namespace Dumux::OnePCompressibleTest
55
56 #endif
57