GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/material/solidstates/updatesolidvolumefractions.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 7 9 77.8%
Functions: 0 255 0.0%
Branches: 61 86 70.9%

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 SolidStates
10 * \brief Update the solid volume fractions (inert and reacitve) and set them in the solidstate
11 */
12 #ifndef DUMUX_UPDATE_SOLID_VOLUME_FRACTION_HH
13 #define DUMUX_UPDATE_SOLID_VOLUME_FRACTION_HH
14
15 namespace Dumux {
16
17 /*!
18 * \ingroup SolidStates
19 * \brief update the solid volume fractions (inert and reacitve) and set them in the solidstate
20 * \note updates the inert components (TODO: these are assumed to come last right now in the solid system!)
21 * \note gets the non-inert components from the primary variables
22 */
23 template<class ElemSol, class Problem, class Element, class Scv, class SolidState>
24 void updateSolidVolumeFractions(const ElemSol& elemSol,
25 const Problem& problem,
26 const Element& element,
27 const Scv& scv,
28 SolidState& solidState,
29 const int solidVolFracOffset)
30 {
31
0/2
✗ Branch 0 not taken.
✗ Branch 1 not taken.
77735286 for (int sCompIdx = solidState.numComponents-solidState.numInertComponents; sCompIdx < solidState.numComponents; ++sCompIdx)
32 {
33
16/20
✓ Branch 0 taken 9517425 times.
✓ Branch 1 taken 8256229 times.
✓ Branch 2 taken 38204763 times.
✓ Branch 3 taken 13770978 times.
✓ Branch 4 taken 1322 times.
✓ Branch 5 taken 6126 times.
✓ Branch 6 taken 528 times.
✓ Branch 7 taken 5638 times.
✓ Branch 8 taken 528 times.
✓ Branch 9 taken 5029 times.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 477999 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 1170 times.
✓ Branch 17 taken 24 times.
✓ Branch 18 taken 3384 times.
✓ Branch 19 taken 528 times.
✗ Branch 20 not taken.
292145096 const auto& sp = problem.spatialParams();
34 using SolidSystem = typename SolidState::SolidSystem;
35
16/20
✓ Branch 0 taken 9517425 times.
✓ Branch 1 taken 8256229 times.
✓ Branch 2 taken 38204763 times.
✓ Branch 3 taken 13770978 times.
✓ Branch 4 taken 1322 times.
✓ Branch 5 taken 6126 times.
✓ Branch 6 taken 528 times.
✓ Branch 7 taken 5638 times.
✓ Branch 8 taken 528 times.
✓ Branch 9 taken 5029 times.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 477999 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 1170 times.
✓ Branch 17 taken 24 times.
✓ Branch 18 taken 3384 times.
✓ Branch 19 taken 528 times.
✗ Branch 20 not taken.
292145096 const auto inertVolumeFraction = sp.template inertVolumeFraction<SolidSystem>(element, scv, elemSol, sCompIdx);
36
27/40
✓ Branch 0 taken 41439638 times.
✓ Branch 1 taken 10814440 times.
✓ Branch 2 taken 41439638 times.
✓ Branch 3 taken 9828740 times.
✓ Branch 4 taken 988640 times.
✓ Branch 5 taken 793685 times.
✓ Branch 6 taken 2964 times.
✓ Branch 7 taken 152 times.
✓ Branch 8 taken 794879 times.
✓ Branch 9 taken 5670 times.
✓ Branch 10 taken 1778 times.
✓ Branch 11 taken 6126 times.
✓ Branch 12 taken 528 times.
✓ Branch 13 taken 6166 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 6166 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 5557 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 12 times.
✓ Branch 20 taken 5029 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 12 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 477999 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 477999 times.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
✓ Branch 31 taken 1170 times.
✗ Branch 32 not taken.
✓ Branch 33 taken 1194 times.
✗ Branch 34 not taken.
✓ Branch 35 taken 3408 times.
✗ Branch 36 not taken.
✓ Branch 37 taken 528 times.
✓ Branch 38 taken 3384 times.
✗ Branch 39 not taken.
✓ Branch 40 taken 528 times.
✗ Branch 41 not taken.
579274723 solidState.setVolumeFraction(sCompIdx, inertVolumeFraction);
37 }
38
39 if (!(solidState.isInert()))
40 {
41 4281055 auto&& priVars = elemSol[scv.localDofIndex()];
42
2/4
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✓ Branch 2 taken 5241208 times.
✓ Branch 3 taken 2620604 times.
7861812 for (int sCompIdx = 0; sCompIdx < solidState.numComponents- solidState.numInertComponents; ++sCompIdx)
43 22634115 solidState.setVolumeFraction(sCompIdx, priVars[solidVolFracOffset + sCompIdx]);
44 }
45 }
46
47 } // end namespace Dumux
48
49 #endif
50