GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/porenetwork/2pnc/iofields.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 16 18 88.9%
Functions: 2 16 12.5%
Branches: 34 92 37.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-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 PNMTwoPNCModel
10 * \copydoc Dumux::PoreNetwork::TwoPNCIOFields
11 */
12 #ifndef DUMUX_PNM_2P_NC_IO_FIELDS_HH
13 #define DUMUX_PNM_2P_NC_IO_FIELDS_HH
14
15 #include <dumux/porousmediumflow/2pnc/iofields.hh>
16 #include <dumux/porenetwork/common/iofields.hh>
17
18 namespace Dumux::PoreNetwork {
19
20 /*!
21 * \ingroup PNMTwoPNCModel
22 * \brief Adds output fields specific to the PNM 2pnc model
23 */
24 class TwoPNCIOFields
25 {
26 public:
27 template <class OutputModule>
28 2 static void initOutputModule(OutputModule& out)
29 {
30 // use default fields from the 2pnc model
31 2 Dumux::TwoPNCIOFields::initOutputModule(out);
32
33 using VolumeVariables = typename OutputModule::VolumeVariables;
34 using FS = typename VolumeVariables::FluidSystem;
35
36 2 CommonIOFields::initOutputModule(out);
37
38
7/18
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✓ Branch 15 taken 2 times.
✓ Branch 17 taken 2 times.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
6 out.addFluxVariable([](const auto& fluxVars, const auto& fluxVarsCache)
39 116 { return fluxVarsCache.pcEntry(); }, "pcEntry");
40
41
7/18
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 2 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 2 times.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
8 out.addFluxVariable([](const auto& fluxVars, const auto& fluxVarsCache)
42 232 { return fluxVarsCache.transmissibility(FS::phase0Idx); }, "transmissibilityW");
43
44
7/18
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 2 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 2 times.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
8 out.addFluxVariable([](const auto& fluxVars, const auto& fluxVarsCache)
45 232 { return fluxVarsCache.transmissibility(FS::phase1Idx); }, "transmissibilityN");
46
47 auto volumeFluxW = [](const auto& fluxVars, const auto& fluxVarsCache)
48 {
49 442 auto upwindTerm = [](const auto& volVars) { return volVars.mobility(FS::phase0Idx); };
50 using std::abs;
51
0/2
✗ Branch 2 not taken.
✗ Branch 3 not taken.
116 return abs(fluxVars.advectiveFlux(FS::phase0Idx, upwindTerm));
52 };
53
7/18
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✓ Branch 15 taken 2 times.
✓ Branch 17 taken 2 times.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
6 out.addFluxVariable(volumeFluxW, "volumeFluxW");
54
55 auto volumeFluxN = [](const auto& fluxVars, const auto& fluxVarsCache)
56 {
57 464 auto upwindTerm = [](const auto& volVars) { return volVars.mobility(FS::phase1Idx); };
58 using std::abs;
59
0/2
✗ Branch 2 not taken.
✗ Branch 3 not taken.
116 return abs(fluxVars.advectiveFlux(FS::phase1Idx, upwindTerm));
60 };
61
6/16
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✓ Branch 15 taken 2 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
6 out.addFluxVariable(volumeFluxN, "volumeFluxN");
62 2 }
63 };
64
65 } // end namespace Dumux::PoreNetwork
66
67 #endif
68