GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/material/solidstates/updatesolidvolumefractions.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 8 8 100.0%
Functions: 0 0 -%
Branches: 20 25 80.0%

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 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 378977287 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
2/2
✓ Branch 0 taken 642698 times.
✓ Branch 1 taken 642698 times.
509187006 for (int sCompIdx = solidState.numComponents-solidState.numInertComponents; sCompIdx < solidState.numComponents; ++sCompIdx)
32 {
33
5/7
✓ Branch 1 taken 21863698 times.
✓ Branch 2 taken 3262 times.
✓ Branch 4 taken 80 times.
✓ Branch 5 taken 644 times.
✗ Branch 3 not taken.
✗ Branch 6 not taken.
✓ Branch 0 taken 43862615 times.
344551813 const auto& sp = problem.spatialParams();
34 using SolidSystem = typename SolidState::SolidSystem;
35
6/7
✓ Branch 1 taken 18975292 times.
✓ Branch 2 taken 31063599 times.
✓ Branch 4 taken 80 times.
✓ Branch 5 taken 644 times.
✓ Branch 3 taken 2322371 times.
✗ Branch 6 not taken.
✓ Branch 0 taken 43379345 times.
428668600 const auto inertVolumeFraction = sp.template inertVolumeFraction<SolidSystem>(element, scv, elemSol, sCompIdx);
36
5/7
✓ Branch 1 taken 10636238 times.
✓ Branch 2 taken 3262 times.
✓ Branch 4 taken 80 times.
✓ Branch 5 taken 644 times.
✗ Branch 3 not taken.
✗ Branch 6 not taken.
✓ Branch 0 taken 37212214 times.
375640540 solidState.setVolumeFraction(sCompIdx, inertVolumeFraction);
37 }
38
39 if (!(solidState.isInert()))
40 {
41 4489281 auto&& priVars = elemSol[scv.localDofIndex()];
42
2/2
✓ Branch 0 taken 5241208 times.
✓ Branch 1 taken 2620604 times.
10373187 for (int sCompIdx = 0; sCompIdx < solidState.numComponents- solidState.numInertComponents; ++sCompIdx)
43 7752583 solidState.setVolumeFraction(sCompIdx, priVars[solidVolFracOffset + sCompIdx]);
44 }
45 }
46
47 } // end namespace Dumux
48
49 #endif
50