GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/discretization/cellcentered/tpfa/elementfluxvariablescache.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 50 73 68.5%
Functions: 285 613 46.5%
Branches: 112 167 67.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-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 CCTpfaDiscretization
10 * \brief The flux variables caches for an element
11 */
12 #ifndef DUMUX_DISCRETIZATION_CCTPFA_ELEMENT_FLUXVARSCACHE_HH
13 #define DUMUX_DISCRETIZATION_CCTPFA_ELEMENT_FLUXVARSCACHE_HH
14
15 #include <algorithm>
16 #include <cassert>
17 #include <vector>
18 #include <utility>
19
20 #include <dune/common/exceptions.hh>
21
22 namespace Dumux {
23
24 /*!
25 * \ingroup CCTpfaDiscretization
26 * \brief The flux variables caches for an element
27 * \note The class is specialized for a version with and without caching
28 * If grid caching is enabled the flux caches are stored for the whole gridview in the corresponding
29 * GridFluxVariablesCache which is memory intensive but faster. For caching disabled the
30 * flux caches are locally computed for each element whenever needed.
31 */
32 template<class GFVC, bool cachingEnabled>
33 class CCTpfaElementFluxVariablesCache;
34
35 /*!
36 * \ingroup CCTpfaDiscretization
37 * \brief The flux variables caches for an element with caching enabled
38 */
39 template<class GFVC>
40 class CCTpfaElementFluxVariablesCache<GFVC, true>
41 {
42 //! the type of the flux variables cache filler
43 using FluxVariablesCacheFiller = typename GFVC::Traits::FluxVariablesCacheFiller;
44
45 public:
46 //! export the type of the grid flux variables cache
47 using GridFluxVariablesCache = GFVC;
48
49 //! export the type of the flux variables cache
50 using FluxVariablesCache = typename GFVC::FluxVariablesCache;
51
52 CCTpfaElementFluxVariablesCache(const GridFluxVariablesCache& global)
53 : gridFluxVarsCachePtr_(&global) {}
54
55 /*!
56 * \brief bind the local view (r-value overload)
57 * This overload is called when an instance of this class is a temporary in the usage context
58 * This allows a usage like this: `const auto view = localView(...).bind(element);`
59 */
60 template<class FVElementGeometry, class ElementVolumeVariables>
61 CCTpfaElementFluxVariablesCache bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
62 const FVElementGeometry& fvGeometry,
63 const ElementVolumeVariables& elemVolVars) &&
64 {
65 this->bindElement(element, fvGeometry, elemVolVars);
66 return std::move(*this);
67 }
68
69 //! Specialization for the global caching being enabled - do nothing here
70 template<class FVElementGeometry, class ElementVolumeVariables>
71 void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
72 const FVElementGeometry& fvGeometry,
73 const ElementVolumeVariables& elemVolVars) & {}
74
75 /*!
76 * \brief bind the local view (r-value overload)
77 * This overload is called when an instance of this class is a temporary in the usage context
78 * This allows a usage like this: `const auto view = localView(...).bind(element);`
79 */
80 template<class FVElementGeometry, class ElementVolumeVariables>
81 CCTpfaElementFluxVariablesCache bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
82 const FVElementGeometry& fvGeometry,
83 const ElementVolumeVariables& elemVolVars) &&
84 {
85 1223710 this->bind(element, fvGeometry, elemVolVars);
86 1223710 return std::move(*this);
87 }
88
89 //! Specialization for the global caching being enabled - do nothing here
90 template<class FVElementGeometry, class ElementVolumeVariables>
91 void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
92 const FVElementGeometry& fvGeometry,
93 const ElementVolumeVariables& elemVolVars) & {}
94
95 /*!
96 * \brief bind the local view (r-value overload)
97 * This overload is called when an instance of this class is a temporary in the usage context
98 * This allows a usage like this: `const auto view = localView(...).bind(element);`
99 */
100 template<class FVElementGeometry, class ElementVolumeVariables>
101 CCTpfaElementFluxVariablesCache bindScvf(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
102 const FVElementGeometry& fvGeometry,
103 const ElementVolumeVariables& elemVolVars,
104 const typename FVElementGeometry::SubControlVolumeFace& scvf) &&
105 {
106 this->bindScvf(element, fvGeometry, elemVolVars, scvf);
107 return std::move(*this);
108 }
109
110 //! Specialization for the global caching being enabled - do nothing here
111 template<class FVElementGeometry, class ElementVolumeVariables>
112 void bindScvf(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
113 const FVElementGeometry& fvGeometry,
114 const ElementVolumeVariables& elemVolVars,
115 const typename FVElementGeometry::SubControlVolumeFace& scvf) & {}
116
117 //! Specialization for the global caching being enabled - do nothing here
118 template<class FVElementGeometry, class ElementVolumeVariables>
119 void update(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
120 const FVElementGeometry& fvGeometry,
121 const ElementVolumeVariables& elemVolVars) {}
122
123 //! access operators in the case of caching
124 template<class SubControlVolumeFace>
125 const FluxVariablesCache& operator [](const SubControlVolumeFace& scvf) const
126
3/6
✓ Branch 0 taken 9056254 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 20950878 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 11894624 times.
✗ Branch 5 not taken.
879567320 { return gridFluxVarsCache()[scvf]; }
127
128 //! The global object we are a restriction of
129 const GridFluxVariablesCache& gridFluxVarsCache() const
130 { return *gridFluxVarsCachePtr_; }
131
132 private:
133 const GridFluxVariablesCache* gridFluxVarsCachePtr_;
134 };
135
136 /*!
137 * \ingroup CCTpfaDiscretization
138 * \brief The flux variables caches for an element with caching disabled
139 */
140 template<class GFVC>
141 2118204 class CCTpfaElementFluxVariablesCache<GFVC, false>
142 {
143 //! the type of the flux variables cache filler
144 using FluxVariablesCacheFiller = typename GFVC::Traits::FluxVariablesCacheFiller;
145
146 public:
147 //! export the type of the grid flux variables cache
148 using GridFluxVariablesCache = GFVC;
149
150 //! export the type of the flux variables cache
151 using FluxVariablesCache = typename GFVC::FluxVariablesCache;
152
153 CCTpfaElementFluxVariablesCache(const GridFluxVariablesCache& global)
154
36/72
✓ Branch 1 taken 509087 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 509087 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 509087 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 21462762 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 21462762 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 21462762 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 318256 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 318256 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 318256 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 253913 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 253913 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 253913 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 270148 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 270148 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 270148 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 312 times.
✗ Branch 47 not taken.
✓ Branch 49 taken 312 times.
✗ Branch 50 not taken.
✓ Branch 52 taken 312 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 6048 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 6048 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 6048 times.
✗ Branch 62 not taken.
✓ Branch 64 taken 55781 times.
✗ Branch 65 not taken.
✓ Branch 67 taken 55781 times.
✗ Branch 68 not taken.
✓ Branch 70 taken 55781 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 50000 times.
✗ Branch 74 not taken.
✓ Branch 76 taken 50000 times.
✗ Branch 77 not taken.
✓ Branch 79 taken 50000 times.
✗ Branch 80 not taken.
✓ Branch 82 taken 964000 times.
✗ Branch 83 not taken.
✓ Branch 85 taken 964000 times.
✗ Branch 86 not taken.
✓ Branch 88 taken 964000 times.
✗ Branch 89 not taken.
✓ Branch 91 taken 100 times.
✗ Branch 92 not taken.
✓ Branch 94 taken 100 times.
✗ Branch 95 not taken.
✓ Branch 97 taken 100 times.
✗ Branch 98 not taken.
✓ Branch 103 taken 1 times.
✗ Branch 104 not taken.
✓ Branch 106 taken 1 times.
✗ Branch 107 not taken.
✓ Branch 109 taken 1 times.
✗ Branch 110 not taken.
71671230 : gridFluxVarsCachePtr_(&global) {}
155
156 /*!
157 * \brief bind the local view (r-value overload)
158 * This overload is called when an instance of this class is a temporary in the usage context
159 * This allows a usage like this: `const auto view = localView(...).bind(element);`
160 */
161 template<class FVElementGeometry, class ElementVolumeVariables>
162 CCTpfaElementFluxVariablesCache bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
163 const FVElementGeometry& fvGeometry,
164 const ElementVolumeVariables& elemVolVars) &&
165 {
166 this->bindElement_(element, fvGeometry, elemVolVars);
167 return std::move(*this);
168 }
169
170 //! Specialization for the global caching being enabled - do nothing here
171 template<class FVElementGeometry, class ElementVolumeVariables>
172 void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
173 const FVElementGeometry& fvGeometry,
174 const ElementVolumeVariables& elemVolVars) &
175 { this->bindElement_(element, fvGeometry, elemVolVars); }
176
177 /*!
178 * \brief bind the local view (r-value overload)
179 * This overload is called when an instance of this class is a temporary in the usage context
180 * This allows a usage like this: `const auto view = localView(...).bind(element);`
181 */
182 template<class FVElementGeometry, class ElementVolumeVariables>
183 784404 CCTpfaElementFluxVariablesCache bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
184 const FVElementGeometry& fvGeometry,
185 const ElementVolumeVariables& elemVolVars) &&
186 {
187 784404 this->bind_(element, fvGeometry, elemVolVars);
188 1568808 return std::move(*this);
189 }
190
191 //! Specialization for the global caching being enabled - do nothing here
192 template<class FVElementGeometry, class ElementVolumeVariables>
193 void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
194 const FVElementGeometry& fvGeometry,
195 const ElementVolumeVariables& elemVolVars) &
196
5/8
✓ Branch 1 taken 40200 times.
✓ Branch 2 taken 36914 times.
✓ Branch 3 taken 76900 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 100 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1928 times.
✗ Branch 9 not taken.
23395046 { this->bind_(element, fvGeometry, elemVolVars); }
197
198 /*!
199 * \brief bind the local view (r-value overload)
200 * This overload is called when an instance of this class is a temporary in the usage context
201 * This allows a usage like this: `const auto view = localView(...).bind(element);`
202 */
203 template<class FVElementGeometry, class ElementVolumeVariables>
204 CCTpfaElementFluxVariablesCache bindScvf(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
205 const FVElementGeometry& fvGeometry,
206 const ElementVolumeVariables& elemVolVars,
207 const typename FVElementGeometry::SubControlVolumeFace& scvf) &&
208 {
209 this->bindScvf_(element, fvGeometry, elemVolVars, scvf);
210 return std::move(*this);
211 }
212
213 //! Specialization for the global caching being enabled - do nothing here
214 template<class FVElementGeometry, class ElementVolumeVariables>
215 void bindScvf(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
216 const FVElementGeometry& fvGeometry,
217 const ElementVolumeVariables& elemVolVars,
218 const typename FVElementGeometry::SubControlVolumeFace& scvf) &
219 { this->bindScvf_(element, fvGeometry, elemVolVars, scvf); }
220
221 /*!
222 * \brief Update the transmissibilities if the volume variables have changed
223 * \note Results in undefined behaviour if called before bind() or with a different element
224 */
225 template<class FVElementGeometry, class ElementVolumeVariables>
226 16879916 void update(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
227 const FVElementGeometry& fvGeometry,
228 const ElementVolumeVariables& elemVolVars)
229 {
230 if (FluxVariablesCacheFiller::isSolDependent)
231 {
232 16879916 const auto& problem = gridFluxVarsCache().problem();
233 33759832 const auto globalI = fvGeometry.gridGeometry().elementMapper().index(element);
234
235 // instantiate filler class
236 16879916 FluxVariablesCacheFiller filler(problem);
237
238 // let the filler class update the caches
239
4/4
✓ Branch 0 taken 119359292 times.
✓ Branch 1 taken 15638903 times.
✓ Branch 2 taken 119359292 times.
✓ Branch 3 taken 15638903 times.
214108556 for (unsigned int localScvfIdx = 0; localScvfIdx < fluxVarsCache_.size(); ++localScvfIdx)
240 {
241
4/4
✓ Branch 0 taken 9450880 times.
✓ Branch 1 taken 9289600 times.
✓ Branch 2 taken 9450880 times.
✓ Branch 3 taken 9289600 times.
258036700 const auto& scvf = fvGeometry.scvf(globalScvfIndices_[localScvfIdx]);
242
243
2/2
✓ Branch 0 taken 62668652 times.
✓ Branch 1 taken 56690640 times.
129018350 const auto scvfInsideScvIdx = scvf.insideScvIdx();
244
2/2
✓ Branch 0 taken 62668652 times.
✓ Branch 1 taken 56690640 times.
197228640 const auto& insideElement = scvfInsideScvIdx == globalI ?
245 element :
246 61434710 fvGeometry.gridGeometry().element(scvfInsideScvIdx);
247
248
2/4
✓ Branch 1 taken 6748246 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6748246 times.
✗ Branch 5 not taken.
258036700 filler.fill(*this, fluxVarsCache_[localScvfIdx], insideElement, fvGeometry, elemVolVars, scvf);
249 }
250 }
251 16879916 }
252
253 //! access operators in the case of no caching
254 template<class SubControlVolumeFace>
255 const FluxVariablesCache& operator [](const SubControlVolumeFace& scvf) const
256
39/39
✓ Branch 1 taken 75377518 times.
✓ Branch 2 taken 33605650 times.
✓ Branch 3 taken 79279774 times.
✓ Branch 4 taken 39872737 times.
✓ Branch 5 taken 13696524 times.
✓ Branch 6 taken 13079228 times.
✓ Branch 7 taken 12707993 times.
✓ Branch 8 taken 50280663 times.
✓ Branch 9 taken 46490403 times.
✓ Branch 10 taken 43829714 times.
✓ Branch 11 taken 43576678 times.
✓ Branch 12 taken 361192 times.
✓ Branch 13 taken 2964 times.
✓ Branch 14 taken 3016 times.
✓ Branch 15 taken 45664 times.
✓ Branch 16 taken 3016 times.
✓ Branch 17 taken 45588 times.
✓ Branch 18 taken 7084 times.
✓ Branch 19 taken 614600 times.
✓ Branch 20 taken 1218412 times.
✓ Branch 21 taken 1211329 times.
✓ Branch 22 taken 1230480 times.
✓ Branch 23 taken 600576 times.
✓ Branch 24 taken 24768 times.
✓ Branch 25 taken 6576 times.
✓ Branch 26 taken 24263 times.
✓ Branch 27 taken 5618 times.
✓ Branch 28 taken 30598 times.
✓ Branch 29 taken 5617 times.
✓ Branch 30 taken 11951 times.
✓ Branch 31 taken 5616 times.
✓ Branch 32 taken 1 times.
✓ Branch 33 taken 36287 times.
✓ Branch 34 taken 1 times.
✓ Branch 35 taken 36287 times.
✓ Branch 36 taken 1 times.
✓ Branch 37 taken 36287 times.
✓ Branch 38 taken 1 times.
✓ Branch 39 taken 36287 times.
517036618 { return fluxVarsCache_[getLocalScvfIdx_(scvf.index())]; }
257
258 //! access operators in the case of no caching
259 template<class SubControlVolumeFace>
260 FluxVariablesCache& operator [](const SubControlVolumeFace& scvf)
261 { return fluxVarsCache_[getLocalScvfIdx_(scvf.index())]; }
262
263 //! The global object we are a restriction of
264 const GridFluxVariablesCache& gridFluxVarsCache() const
265 { return *gridFluxVarsCachePtr_; }
266
267 private:
268
269 /*!
270 * \brief Prepares the transmissibilities of the scv faces in an element
271 * \note the fvGeometry is assumed to be bound to the same element
272 * \note this function has to be called prior to flux calculations on the element.
273 */
274 template<class FVElementGeometry, class ElementVolumeVariables>
275 void bindElement_(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
276 const FVElementGeometry& fvGeometry,
277 const ElementVolumeVariables& elemVolVars)
278 {
279 // resizing of the cache
280 const auto numScvf = fvGeometry.numScvf();
281 fluxVarsCache_.resize(numScvf);
282 globalScvfIndices_.resize(numScvf);
283
284 // instantiate helper class to fill the caches
285 FluxVariablesCacheFiller filler(gridFluxVarsCache().problem());
286
287 std::size_t localScvfIdx = 0;
288 // fill the containers
289 for (auto&& scvf : scvfs(fvGeometry))
290 {
291 filler.fill(*this, fluxVarsCache_[localScvfIdx], element, fvGeometry, elemVolVars, scvf, true);
292 globalScvfIndices_[localScvfIdx] = scvf.index();
293 localScvfIdx++;
294 }
295 }
296
297 /*!
298 * \brief Prepares the transmissibilities of the scv faces in the stencil of an element
299 * \note the fvGeometry is assumed to be bound to the same element
300 * \note this function has to be called prior to flux calculations on the element.
301 */
302 template<class FVElementGeometry, class ElementVolumeVariables>
303 26081756 void bind_(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
304 const FVElementGeometry& fvGeometry,
305 const ElementVolumeVariables& elemVolVars)
306 {
307 26081756 const auto& problem = gridFluxVarsCache().problem();
308 26081756 const auto& gridGeometry = fvGeometry.gridGeometry();
309 52163512 const auto globalI = gridGeometry.elementMapper().index(element);
310 52163512 const auto& connectivityMapI = gridGeometry.connectivityMap()[globalI];
311 26081756 const auto numNeighbors = connectivityMapI.size();
312
313 // instantiate helper class to fill the caches
314 26081756 FluxVariablesCacheFiller filler(problem);
315
316 // find the number of scv faces that need to be prepared
317 26081756 auto numScvf = fvGeometry.numScvf();
318
2/2
✓ Branch 0 taken 73327270 times.
✓ Branch 1 taken 24046191 times.
106184248 for (unsigned int localIdxJ = 0; localIdxJ < numNeighbors; ++localIdxJ)
319 160204984 numScvf += connectivityMapI[localIdxJ].scvfsJ.size();
320
321 // fill the containers with the data on the scv faces inside the actual element
322 26081756 fluxVarsCache_.resize(numScvf);
323 26081756 globalScvfIndices_.resize(numScvf);
324 26081756 unsigned int localScvfIdx = 0;
325
4/4
✓ Branch 0 taken 78158491 times.
✓ Branch 1 taken 24046191 times.
✓ Branch 2 taken 78158491 times.
✓ Branch 3 taken 24046191 times.
195918968 for (auto&& scvf : scvfs(fvGeometry))
326 {
327 137243168 filler.fill(*this, fluxVarsCache_[localScvfIdx], element, fvGeometry, elemVolVars, scvf, true);
328 85065353 globalScvfIndices_[localScvfIdx] = scvf.index();
329 85065353 localScvfIdx++;
330 }
331
332 // add required data on the scv faces in the neighboring elements
333
2/2
✓ Branch 0 taken 73327270 times.
✓ Branch 1 taken 24046191 times.
106184248 for (unsigned int localIdxJ = 0; localIdxJ < numNeighbors; ++localIdxJ)
334 {
335 179831308 const auto elementJ = gridGeometry.element(connectivityMapI[localIdxJ].globalJ);
336
2/2
✓ Branch 0 taken 73327270 times.
✓ Branch 1 taken 73327270 times.
400040888 for (auto scvfIdx : connectivityMapI[localIdxJ].scvfsJ)
337 {
338 80102492 auto&& scvfJ = fvGeometry.scvf(scvfIdx);
339
2/4
✓ Branch 1 taken 1110480 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1110480 times.
✗ Branch 5 not taken.
128225256 filler.fill(*this, fluxVarsCache_[localScvfIdx], elementJ, fvGeometry, elemVolVars, scvfJ, true);
340 80102492 globalScvfIndices_[localScvfIdx] = scvfJ.index();
341 80102492 localScvfIdx++;
342 }
343 }
344 26081756 }
345
346 /*!
347 * \brief Prepares the transmissibilities of a single scv face
348 * \note the fvGeometry is assumed to be bound to the same element
349 * \note this function has to be called prior to flux calculations on the element.
350 */
351 template<class FVElementGeometry, class ElementVolumeVariables>
352 void bindScvf_(const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
353 const FVElementGeometry& fvGeometry,
354 const ElementVolumeVariables& elemVolVars,
355 const typename FVElementGeometry::SubControlVolumeFace& scvf)
356 {
357 fluxVarsCache_.resize(1);
358 globalScvfIndices_.resize(1);
359
360 // instantiate helper class to fill the caches
361 FluxVariablesCacheFiller filler(gridFluxVarsCache().problem());
362
363 filler.fill(*this, fluxVarsCache_[0], element, fvGeometry, elemVolVars, scvf, true);
364 globalScvfIndices_[0] = scvf.index();
365 }
366
367 const GridFluxVariablesCache* gridFluxVarsCachePtr_;
368
369 //! get index of scvf in the local container
370 517339018 int getLocalScvfIdx_(const int scvfIdx) const
371 {
372 1552017054 auto it = std::find(globalScvfIndices_.begin(), globalScvfIndices_.end(), scvfIdx);
373
3/6
✗ Branch 0 not taken.
✓ Branch 1 taken 491979257 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 491979257 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 491979257 times.
1552017054 assert(it != globalScvfIndices_.end() && "Could not find the flux vars cache for scvfIdx");
374 1552017054 return std::distance(globalScvfIndices_.begin(), it);
375 }
376
377 std::vector<FluxVariablesCache> fluxVarsCache_;
378 std::vector<std::size_t> globalScvfIndices_;
379 };
380
381 } // end namespace Dumux
382
383 #endif
384