GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/porenetwork/1pnc/iofields.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 10 10 100.0%
Functions: 4 4 100.0%
Branches: 5 10 50.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 PNMOnePNCModel
10 * \copydoc Dumux::PoreNetwork::OnePNCIOFields
11 */
12 #ifndef DUMUX_PNM_ONEP_NC_IO_FIELDS_HH
13 #define DUMUX_PNM_ONEP_NC_IO_FIELDS_HH
14
15 #include <dumux/porousmediumflow/1pnc/iofields.hh>
16 #include <dumux/porenetwork/common/iofields.hh>
17
18 namespace Dumux::PoreNetwork {
19
20 /*!
21 * \ingroup PNMOnePNCModel
22 * \brief Adds output fields specific to the PNM 1pnc model
23 */
24 template<class FluidSystem>
25 class OnePNCIOFields
26 {
27 public:
28 template<class OutputModule>
29 6 static void initOutputModule(OutputModule& out)
30 {
31 6 Dumux::OnePNCIOFields::initOutputModule(out);
32 6 CommonIOFields::initOutputModule(out);
33
34
3/6
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 6 times.
✗ Branch 9 not taken.
12 out.addFluxVariable([](const auto& fluxVars, const auto& fluxVarsCache)
35 23075 { return fluxVarsCache.transmissibility(0); }, "transmissibility");
36
37 23075 auto volumeFlux = [](const auto& fluxVars, const auto& fluxVarsCache)
38 {
39 23075 auto upwindTerm = [](const auto& volVars) { return volVars.mobility(0); };
40 using std::abs;
41 23075 return abs(fluxVars.advectiveFlux(0, upwindTerm));
42 };
43
2/4
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
12 out.addFluxVariable(volumeFlux, "volumeFlux");
44 6 }
45 };
46
47 } // end namespace Dumux::PoreNetwork
48
49 #endif
50