GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/freeflow/navierstokes/energy/iofields.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 5 5 100.0%
Functions: 4 4 100.0%
Branches: 3 5 60.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 FreeflowNIModel
10 * \copydoc Dumux::NavierStokesEnergyIOFields
11 */
12 #ifndef DUMUX_FREEFLOW_NAVIERSTOKES_ENERGY_IO_FIELDS_HH
13 #define DUMUX_FREEFLOW_NAVIERSTOKES_ENERGY_IO_FIELDS_HH
14
15 #include <dumux/io/name.hh>
16
17 namespace Dumux {
18
19 /*!
20 * \ingroup FreeflowNIModel
21 * \brief Adds I/O fields specific to non-isothermal free-flow models
22 */
23 template<class IsothermalIOFields>
24 struct NavierStokesEnergyIOFields
25 {
26
27 //! Add the non-isothermal specific output fields.
28 template <class OutputModule>
29 6 static void initOutputModule(OutputModule& out)
30 {
31 6 IsothermalIOFields::initOutputModule(out);
32
33
1/2
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
12 out.addVolumeVariable([](const auto& v){ return v.temperature(); }, IOName::temperature());
34
2/3
✓ Branch 2 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
26012 out.addVolumeVariable([](const auto& v){ return v.fluidThermalConductivity(); }, "lambda");
35 6 }
36
37 //! return the names of the primary variables
38 template<class ModelTraits, class FluidSystem = void>
39 static std::string primaryVariableName(int pvIdx, int state = 0)
40 {
41 if (pvIdx < ModelTraits::numEq() - 1)
42 return IsothermalIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
43 else
44 return IOName::temperature();
45 }
46 };
47
48 } // end namespace Dumux
49
50 #endif
51