GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/porenetwork/common/iofields.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 10 10 100.0%
Functions: 19 19 100.0%
Branches: 6 12 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 PoreNetworkModels
10 * \copydoc Dumux::PoreNetwork::CommonIOFields
11 */
12 #ifndef DUMUX_PNM_COMMON_OUTPUT_FIELDS_HH
13 #define DUMUX_PNM_COMMON_OUTPUT_FIELDS_HH
14
15 #include <dumux/io/vtk/function.hh>
16 #include <dumux/io/vtk/fieldtype.hh>
17
18 namespace Dumux::PoreNetwork {
19
20 /*!
21 * \ingroup PoreNetworkModels
22 * \brief Adds output fields specific to all pore-network models
23 */
24 class CommonIOFields
25 {
26 public:
27 template <class OutputModule>
28 28 static void initOutputModule(OutputModule& out)
29 {
30
1/2
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
28 out.addField(out.problem().gridGeometry().coordinationNumber(), "coordinationNumber", Vtk::FieldType::vertex);
31
32
1/2
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
28 out.addField(out.problem().gridGeometry().poreLabel(), "poreLabel", Vtk::FieldType::vertex);
33
34
1/2
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
74356 out.addVolumeVariable([](const auto& volVars){ return volVars.poreInscribedRadius(); }, "poreInscribedRadius");
35
36
1/2
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
28 out.addField(out.problem().gridGeometry().throatLabel(), "throatLabel", Vtk::FieldType::element);
37
38
1/2
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
37206 out.addFluxVariable([](const auto& fluxVars, const auto& fluxVarsCache)
39 113310 { return fluxVarsCache.throatInscribedRadius(); }, "throatInscribedRadius");
40
41
1/2
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
37206 out.addFluxVariable([](const auto& fluxVars, const auto& fluxVarsCache)
42 113310 { return fluxVarsCache.throatLength(); }, "throatLength");
43 28 }
44 };
45
46 } // end namespace Dumux::PoreNetwork
47
48 #endif
49