GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/discretization/cvfe/elementvolumevariables.hh
Date: 2025-06-14 19:21:29
Exec Total Coverage
Lines: 53 55 96.4%
Functions: 109 110 99.1%
Branches: 271 400 67.8%

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 CVFEDiscretization
10 * \brief The local volume variables class
11 */
12 #ifndef DUMUX_DISCRETIZATION_CVFE_ELEMENT_VOLUMEVARIABLES_HH
13 #define DUMUX_DISCRETIZATION_CVFE_ELEMENT_VOLUMEVARIABLES_HH
14
15 #include <type_traits>
16 #include <utility>
17 #include <vector>
18
19 #include <dumux/discretization/elementsolution.hh>
20
21 namespace Dumux {
22
23 /*!
24 * \ingroup CVFEDiscretization
25 * \brief The local (stencil) volume variables class for control-volume finite element
26 * \note The class is specialized for versions with and without caching
27 * \tparam GVV the grid volume variables type
28 * \tparam cachingEnabled if the cache is enabled
29 */
30 template<class GVV, bool cachingEnabled>
31 class CVFEElementVolumeVariables;
32
33 /*!
34 * \ingroup CVFEDiscretization
35 * \brief The local (stencil) volume variables class for control-volume finite element with caching
36 * \note the volume variables are stored for the whole grid view in the corresponding GridVolumeVariables class
37 */
38 template<class GVV>
39 class CVFEElementVolumeVariables<GVV, /*cachingEnabled*/true>
40 {
41 class MutableVariablesView
42 {
43 public:
44 5331514 MutableVariablesView(GVV& gridCache)
45 : gridCache_(gridCache) {}
46
47 using VolumeVariables = typename GVV::VolumeVariables;
48
49 template<class SubControlVolume>
50 101374850 VolumeVariables& operator [](const SubControlVolume& scv) const
51 101374850 { return gridCache_.volVars(scv.elementIndex(), scv.indexInElement()); }
52 private:
53 GVV& gridCache_;
54 };
55
56 public:
57 //! export type of the grid volume variables
58 using GridVolumeVariables = GVV;
59
60 //! export type of the mutable version of the view
61 using MutableView = MutableVariablesView;
62
63 //! export type of the volume variables
64 using VolumeVariables = typename GridVolumeVariables::VolumeVariables;
65
66 //! Constructor
67
13/16
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 10280 times.
✓ Branch 4 taken 853 times.
✓ Branch 5 taken 20 times.
✓ Branch 7 taken 1786741 times.
✓ Branch 8 taken 10909 times.
✓ Branch 12 taken 3200 times.
✓ Branch 13 taken 14000 times.
✓ Branch 15 taken 3200 times.
✗ Branch 16 not taken.
✓ Branch 11 taken 7207 times.
✓ Branch 3 taken 926094 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 24 times.
✓ Branch 10 taken 6512 times.
✗ Branch 14 not taken.
4656132 CVFEElementVolumeVariables(const GridVolumeVariables& gridVolVars)
68 : gridVolVarsPtr_(&gridVolVars) {}
69
70 1338837534 const VolumeVariables& operator [](std::size_t scvIdx) const
71
6/6
✓ Branch 0 taken 21505128 times.
✓ Branch 1 taken 23552996 times.
✓ Branch 2 taken 139579651 times.
✓ Branch 3 taken 176352129 times.
✓ Branch 4 taken 40525374 times.
✓ Branch 5 taken 88482914 times.
686874752 { return gridVolVars().volVars(eIdx_, scvIdx); }
72
73 template<class SubControlVolume, typename std::enable_if_t<!std::is_integral<SubControlVolume>::value, int> = 0>
74 3113349986 const VolumeVariables& operator [](const SubControlVolume& scv) const
75
1/2
✓ Branch 1 taken 80 times.
✗ Branch 2 not taken.
1318119104 { return gridVolVars().volVars(eIdx_, scv.indexInElement()); }
76
77 /*!
78 * \brief bind the local view (r-value overload)
79 * This overload is called when an instance of this class is a temporary in the usage context
80 * This allows a usage like this: `const auto view = localView(...).bind(element);`
81 */
82 template<class FVElementGeometry, class SolutionVector>
83 256389 CVFEElementVolumeVariables bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
84 const FVElementGeometry& fvGeometry,
85 const SolutionVector& sol) &&
86 {
87 256389 this->bindElement(element, fvGeometry, sol);
88 return std::move(*this);
89 }
90
91 // For compatibility reasons with the case of not storing the vol vars.
92 // function to be called before assembling an element, preparing the vol vars within the stencil
93 template<class FVElementGeometry, class SolutionVector>
94 7773020 void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
95 const FVElementGeometry& fvGeometry,
96 const SolutionVector& sol) &
97 {
98 7773020 bindElement(element, fvGeometry, sol);
99 303520 }
100
101 /*!
102 * \brief bind the local view (r-value overload)
103 * This overload is called when an instance of this class is a temporary in the usage context
104 * This allows a usage like this: `const auto view = localView(...).bind(element);`
105 */
106 template<class FVElementGeometry, class SolutionVector>
107 39030 CVFEElementVolumeVariables bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
108 const FVElementGeometry& fvGeometry,
109 const SolutionVector& sol) &&
110 {
111 39030 this->bindElement(element, fvGeometry, sol);
112 return std::move(*this);
113 }
114
115 // function to prepare the vol vars within the element
116 template<class FVElementGeometry, class SolutionVector>
117
13/25
✓ Branch 1 taken 55304 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 10647 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 138216 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 290541 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✓ Branch 25 taken 3200 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 3200 times.
✗ Branch 29 not taken.
✓ Branch 23 taken 7200 times.
✗ Branch 24 not taken.
✓ Branch 3 taken 10278 times.
✓ Branch 6 taken 20556 times.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✓ Branch 15 taken 1193235 times.
✓ Branch 18 taken 71568 times.
✗ Branch 19 not taken.
16655838 void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
118 const FVElementGeometry& fvGeometry,
119 const SolutionVector& sol) &
120 {
121
18/33
✓ Branch 1 taken 55304 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 10278 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 148494 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 311097 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 20558 times.
✓ Branch 14 taken 5 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 1193237 times.
✓ Branch 18 taken 261051 times.
✓ Branch 19 taken 1193235 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 92366 times.
✓ Branch 31 taken 10400 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 3200 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 3200 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 3200 times.
✗ Branch 41 not taken.
✓ Branch 28 taken 7200 times.
✗ Branch 29 not taken.
✓ Branch 6 taken 21015 times.
✓ Branch 9 taken 1228863 times.
✗ Branch 17 not taken.
✓ Branch 26 taken 4 times.
✗ Branch 27 not taken.
✗ Branch 20 not taken.
✗ Branch 23 not taken.
16655838 eIdx_ = fvGeometry.gridGeometry().elementMapper().index(element);
122 6106785 }
123
124 //! The global volume variables object we are a restriction of
125 3040906048 const GridVolumeVariables& gridVolVars() const
126
24/26
✓ Branch 1 taken 2252434 times.
✓ Branch 2 taken 7 times.
✓ Branch 3 taken 15840 times.
✓ Branch 4 taken 37500861 times.
✓ Branch 6 taken 6968329 times.
✓ Branch 7 taken 59453281 times.
✓ Branch 8 taken 95100312 times.
✓ Branch 9 taken 288494324 times.
✓ Branch 10 taken 164136348 times.
✓ Branch 11 taken 11822073 times.
✓ Branch 12 taken 409018688 times.
✓ Branch 13 taken 67769324 times.
✓ Branch 14 taken 129978660 times.
✓ Branch 15 taken 116249920 times.
✓ Branch 16 taken 8589768 times.
✓ Branch 17 taken 78913678 times.
✓ Branch 18 taken 25403468 times.
✓ Branch 19 taken 248826950 times.
✓ Branch 20 taken 9268958 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 64494264 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 514648 times.
✓ Branch 25 taken 40560 times.
✓ Branch 5 taken 48656471 times.
✓ Branch 0 taken 2089776 times.
3063444292 { return *gridVolVarsPtr_; }
127
128 /*!
129 * \brief return a local view on variables that is always mutable, regardless of the caching policy
130 * \pre bind has to be called before, otherwise using the view will result in undefined behavior
131 */
132 5331514 MutableView asMutableView(GridVolumeVariables& gridVolVars)
133 5331514 { return { gridVolVars }; }
134
135 private:
136 const GridVolumeVariables* gridVolVarsPtr_;
137 std::size_t eIdx_;
138 };
139
140
141 /*!
142 * \ingroup CVFEDiscretization
143 * \brief The local (stencil) volume variables class for control-volume finite element without caching
144 */
145 template<class GVV>
146
66/111
✓ Branch 0 taken 282 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 314 times.
✓ Branch 5 taken 1232 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✓ Branch 9 taken 892 times.
✓ Branch 10 taken 140893 times.
✓ Branch 11 taken 5746761 times.
✓ Branch 12 taken 3 times.
✓ Branch 13 taken 1619 times.
✓ Branch 14 taken 5742025 times.
✓ Branch 15 taken 1122 times.
✓ Branch 18 taken 789354 times.
✓ Branch 19 taken 57360 times.
✓ Branch 20 taken 2475 times.
✓ Branch 21 taken 3561 times.
✓ Branch 22 taken 218553 times.
✓ Branch 23 taken 20364 times.
✓ Branch 26 taken 319650 times.
✓ Branch 27 taken 163973 times.
✗ Branch 28 not taken.
✓ Branch 29 taken 4516 times.
✓ Branch 30 taken 64 times.
✓ Branch 31 taken 958 times.
✓ Branch 32 taken 1628 times.
✓ Branch 33 taken 153853 times.
✓ Branch 34 taken 1387536 times.
✓ Branch 35 taken 487 times.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✓ Branch 39 taken 260112 times.
✓ Branch 40 taken 6552 times.
✓ Branch 41 taken 6981 times.
✓ Branch 42 taken 64064 times.
✗ Branch 43 not taken.
✓ Branch 44 taken 153856 times.
✓ Branch 46 taken 400 times.
✓ Branch 47 taken 16 times.
✗ Branch 48 not taken.
✓ Branch 49 taken 6724 times.
✗ Branch 50 not taken.
✓ Branch 51 taken 3021 times.
✓ Branch 52 taken 3021 times.
✗ Branch 53 not taken.
✓ Branch 54 taken 353 times.
✗ Branch 55 not taken.
✓ Branch 57 taken 352 times.
✓ Branch 58 taken 1 times.
✓ Branch 59 taken 7712 times.
✗ Branch 60 not taken.
✓ Branch 61 taken 326574 times.
✓ Branch 62 taken 12168 times.
✓ Branch 64 taken 7708 times.
✗ Branch 65 not taken.
✓ Branch 66 taken 175910 times.
✓ Branch 67 taken 14628 times.
✗ Branch 69 not taken.
✓ Branch 70 taken 50000 times.
✓ Branch 71 taken 2 times.
✗ Branch 72 not taken.
✗ Branch 73 not taken.
✓ Branch 74 taken 100000 times.
✓ Branch 75 taken 2 times.
✗ Branch 76 not taken.
✗ Branch 77 not taken.
✓ Branch 78 taken 50000 times.
✓ Branch 79 taken 705 times.
✗ Branch 80 not taken.
✓ Branch 81 taken 50001 times.
✗ Branch 82 not taken.
✓ Branch 83 taken 1 times.
✗ Branch 84 not taken.
✓ Branch 85 taken 1 times.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✓ Branch 88 taken 964000 times.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✓ Branch 36 taken 196032 times.
✓ Branch 45 taken 153840 times.
✓ Branch 56 taken 7712 times.
✓ Branch 16 taken 57594 times.
✓ Branch 17 taken 742 times.
✓ Branch 25 taken 7 times.
✓ Branch 24 taken 1232 times.
✗ Branch 68 not taken.
✗ Branch 63 not taken.
✓ Branch 91 taken 964000 times.
✗ Branch 92 not taken.
✗ Branch 93 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 96 not taken.
✓ Branch 101 taken 1000 times.
✗ Branch 102 not taken.
✗ Branch 104 not taken.
✓ Branch 105 taken 100 times.
✗ Branch 107 not taken.
✗ Branch 108 not taken.
✓ Branch 109 taken 1 times.
✗ Branch 110 not taken.
✗ Branch 112 not taken.
✗ Branch 113 not taken.
✓ Branch 114 taken 1 times.
✗ Branch 115 not taken.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
21819342 class CVFEElementVolumeVariables<GVV, /*cachingEnabled*/false>
147 {
148 using ThisType = CVFEElementVolumeVariables<GVV, /*cachingEnabled*/false>;
149
150 class MutableVariablesView
151 {
152 public:
153 5536102 MutableVariablesView(ThisType& view)
154 : view_(view) {}
155
156 using VolumeVariables = typename GVV::VolumeVariables;
157
158 template<class SubControlVolume>
159 110382088 VolumeVariables& operator [](const SubControlVolume& scv) const
160 110382088 { return view_[scv]; }
161 private:
162 ThisType& view_;
163 };
164
165 public:
166 //! export type of the grid volume variables
167 using GridVolumeVariables = GVV;
168
169 //! export type of the mutable version of the view
170 using MutableView = MutableVariablesView;
171
172 //! export type of the volume variables
173 using VolumeVariables = typename GridVolumeVariables::VolumeVariables;
174
175 //! Constructor
176 9968514 CVFEElementVolumeVariables(const GridVolumeVariables& gridVolVars)
177
25/34
✓ Branch 1 taken 282 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1220 times.
✓ Branch 5 taken 154316 times.
✓ Branch 7 taken 5773930 times.
✓ Branch 8 taken 153840 times.
✓ Branch 10 taken 215832 times.
✓ Branch 11 taken 16 times.
✓ Branch 13 taken 219675 times.
✓ Branch 14 taken 352 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 6944 times.
✓ Branch 18 taken 3021 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 7712 times.
✓ Branch 21 taken 3021 times.
✓ Branch 23 taken 388742 times.
✗ Branch 24 not taken.
✓ Branch 26 taken 1146830 times.
✗ Branch 27 not taken.
✓ Branch 29 taken 2 times.
✓ Branch 30 taken 1 times.
✓ Branch 32 taken 2 times.
✗ Branch 33 not taken.
✓ Branch 35 taken 1 times.
✗ Branch 36 not taken.
✓ Branch 38 taken 1 times.
✗ Branch 39 not taken.
✓ Branch 6 taken 754 times.
✓ Branch 12 taken 260096 times.
✓ Branch 3 taken 17170 times.
✓ Branch 9 taken 4489 times.
✓ Branch 17 taken 8108 times.
✗ Branch 31 not taken.
9650507 : gridVolVarsPtr_(&gridVolVars) {}
178
179 /*!
180 * \brief bind the local view (r-value overload)
181 * This overload is called when an instance of this class is a temporary in the usage context
182 * This allows a usage like this: `const auto view = localView(...).bind(element);`
183 */
184 template<class FVElementGeometry, class SolutionVector>
185 318007 CVFEElementVolumeVariables bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
186 const FVElementGeometry& fvGeometry,
187 const SolutionVector& sol) &&
188 {
189
4/8
✓ Branch 1 taken 161146 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 161146 times.
✓ Branch 6 taken 156861 times.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✓ Branch 9 taken 156861 times.
318007 this->bindElement(element, fvGeometry, sol);
190
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 161146 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 156861 times.
318007 return std::move(*this);
191 }
192
193 // specialization for control-volume finite element, simply forwards to the bindElement method
194 template<class FVElementGeometry, class SolutionVector>
195 9129743 void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
196 const FVElementGeometry& fvGeometry,
197 const SolutionVector& sol) &
198 {
199
21/38
✓ Branch 1 taken 57360 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 278815 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 15132 times.
✓ Branch 8 taken 57282 times.
✓ Branch 10 taken 31352 times.
✓ Branch 11 taken 92 times.
✓ Branch 15 taken 19752 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 17398 times.
✓ Branch 19 taken 704 times.
✓ Branch 21 taken 1007 times.
✓ Branch 22 taken 64 times.
✓ Branch 24 taken 2184 times.
✓ Branch 25 taken 800 times.
✓ Branch 27 taken 2184 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 101007 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 1007 times.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 8788 times.
✓ Branch 14 taken 31352 times.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 23 not taken.
✗ Branch 26 not taken.
✓ Branch 35 taken 200 times.
✓ Branch 38 taken 100 times.
✓ Branch 41 taken 1928 times.
✗ Branch 42 not taken.
✗ Branch 9 not taken.
9129743 bindElement(element, fvGeometry, sol);
200 628508 }
201
202 /*!
203 * \brief bind the local view (r-value overload)
204 * This overload is called when an instance of this class is a temporary in the usage context
205 * This allows a usage like this: `const auto view = localView(...).bind(element);`
206 */
207 template<class FVElementGeometry, class SolutionVector>
208 40626 CVFEElementVolumeVariables bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
209 const FVElementGeometry& fvGeometry,
210 const SolutionVector& sol) &&
211 {
212
1/2
✓ Branch 1 taken 40626 times.
✗ Branch 2 not taken.
40626 this->bindElement(element, fvGeometry, sol);
213 40626 return std::move(*this);
214 }
215
216 // specialization for control-volume finite element
217 template<class FVElementGeometry, class SolutionVector>
218 26208810 void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
219 const FVElementGeometry& fvGeometry,
220 const SolutionVector& sol) &
221 {
222 // get the solution at the dofs of the element
223 26208810 auto elemSol = elementSolution(element, sol, fvGeometry.gridGeometry());
224
225 // resize volume variables to the required size
226 26208810 volumeVariables_.resize(fvGeometry.numScv());
227
2/2
✓ Branch 0 taken 69846936 times.
✓ Branch 1 taken 20678360 times.
110381852 for (auto&& scv : scvs(fvGeometry))
228 84173060 volumeVariables_[scv.indexInElement()].update(elemSol, gridVolVars().problem(), element, scv);
229 26208792 }
230
231 2384885178 const VolumeVariables& operator [](std::size_t scvIdx) const
232
25/28
✓ Branch 0 taken 34654 times.
✓ Branch 1 taken 82738605 times.
✓ Branch 2 taken 40008688 times.
✓ Branch 3 taken 43267996 times.
✓ Branch 4 taken 2073205 times.
✓ Branch 5 taken 285146138 times.
✓ Branch 6 taken 171940549 times.
✓ Branch 7 taken 149533352 times.
✓ Branch 8 taken 36603554 times.
✓ Branch 9 taken 482033544 times.
✓ Branch 10 taken 230244904 times.
✓ Branch 11 taken 246796583 times.
✓ Branch 12 taken 12454755 times.
✓ Branch 13 taken 240888424 times.
✓ Branch 14 taken 5156382 times.
✓ Branch 15 taken 44265443 times.
✓ Branch 16 taken 164295 times.
✓ Branch 17 taken 6379081 times.
✓ Branch 18 taken 376 times.
✓ Branch 19 taken 103884 times.
✓ Branch 20 taken 2084560 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 2084560 times.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 1360 times.
✓ Branch 26 taken 375 times.
✓ Branch 27 taken 985 times.
1248381963 { return volumeVariables_[scvIdx]; }
233
234 VolumeVariables& operator [](std::size_t scvIdx)
235 { return volumeVariables_[scvIdx]; }
236
237 template<class SubControlVolume, typename std::enable_if_t<!std::is_integral<SubControlVolume>::value, int> = 0>
238 5131798718 const VolumeVariables& operator [](const SubControlVolume& scv) const
239
34/36
✓ Branch 0 taken 270335476 times.
✓ Branch 1 taken 5256640 times.
✓ Branch 2 taken 372107075 times.
✓ Branch 3 taken 405175703 times.
✓ Branch 6 taken 43945291 times.
✓ Branch 7 taken 11714163 times.
✓ Branch 8 taken 4223456 times.
✓ Branch 9 taken 6913492 times.
✓ Branch 11 taken 10797453 times.
✓ Branch 12 taken 3539896 times.
✓ Branch 16 taken 122938 times.
✓ Branch 17 taken 34955041 times.
✓ Branch 18 taken 1841206 times.
✓ Branch 19 taken 3203411 times.
✓ Branch 20 taken 15321191 times.
✓ Branch 21 taken 8595266 times.
✓ Branch 22 taken 4874452 times.
✓ Branch 23 taken 3839952 times.
✓ Branch 24 taken 82761 times.
✓ Branch 25 taken 667718 times.
✓ Branch 26 taken 1300 times.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✓ Branch 29 taken 2600 times.
✓ Branch 30 taken 154560 times.
✓ Branch 31 taken 5784 times.
✓ Branch 32 taken 2913 times.
✓ Branch 33 taken 2871 times.
✓ Branch 34 taken 1 times.
✓ Branch 35 taken 37039 times.
✓ Branch 4 taken 599019174 times.
✓ Branch 5 taken 275742318 times.
✓ Branch 10 taken 9570917 times.
✓ Branch 13 taken 23640852 times.
✓ Branch 14 taken 36767 times.
✓ Branch 15 taken 4225598 times.
5147298371 { return volumeVariables_[scv.indexInElement()]; }
240
241 template<class SubControlVolume, typename std::enable_if_t<!std::is_integral<SubControlVolume>::value, int> = 0>
242 125354907 VolumeVariables& operator [](const SubControlVolume& scv)
243
5/9
✗ Branch 0 not taken.
✓ Branch 1 taken 2732208 times.
✓ Branch 2 taken 751344 times.
✓ Branch 3 taken 3605806 times.
✓ Branch 9 taken 57 times.
✗ Branch 10 not taken.
✗ Branch 4 not taken.
✓ Branch 5 taken 2202 times.
✗ Branch 6 not taken.
125354907 { return volumeVariables_[scv.indexInElement()]; }
244
245 //! The global volume variables object we are a restriction of
246 69606194 const GridVolumeVariables& gridVolVars() const
247
11/18
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 100 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 50 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 13 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 5 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 3 times.
✗ Branch 17 not taken.
✓ Branch 9 taken 42315 times.
✓ Branch 12 taken 46190 times.
✓ Branch 15 taken 2 times.
✓ Branch 6 taken 5130 times.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
69942194 { return *gridVolVarsPtr_; }
248
249 /*!
250 * \brief return a local view on variables that is always mutable, regardless of the caching policy
251 * \pre bind has to be called before, otherwise using the view will result in undefined behavior
252 */
253 5536102 MutableView asMutableView(GridVolumeVariables&)
254 5536102 { return { *this }; }
255
256 private:
257 const GridVolumeVariables* gridVolVarsPtr_;
258 std::vector<VolumeVariables> volumeVariables_;
259 };
260
261 } // end namespace Dumux
262
263 #endif
264