GCC Code Coverage Report


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