GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/freeflow/nonisothermal/iofields.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 9 9 100.0%
Functions: 26 31 83.9%
Branches: 5 8 62.5%

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::FreeflowNonIsothermalIOFields
11 */
12 #ifndef DUMUX_FREEFLOW_NI_IO_FIELDS_HH
13 #define DUMUX_FREEFLOW_NI_IO_FIELDS_HH
14
15
16 #include <dumux/io/name.hh>
17
18 namespace Dumux {
19
20 /*!
21 * \ingroup FreeflowNIModel
22 * \brief Adds I/O fields specific to non-isothermal free-flow models
23 */
24 template<class IsothermalIOFields, bool turbulenceModel = false>
25 struct FreeflowNonIsothermalIOFields
26 {
27
28 //! Add the non-isothermal specific output fields.
29 template <class OutputModule>
30 40 static void initOutputModule(OutputModule& out)
31 {
32 40 IsothermalIOFields::initOutputModule(out);
33
34
1/2
✓ Branch 2 taken 28 times.
✗ Branch 3 not taken.
380 out.addVolumeVariable([](const auto& v){ return v.temperature(); }, IOName::temperature());
35
1/2
✓ Branch 2 taken 28 times.
✗ Branch 3 not taken.
380 out.addVolumeVariable([](const auto& v){ return v.thermalConductivity(); }, "lambda");
36 if (turbulenceModel)
37
1/2
✓ Branch 2 taken 25 times.
✗ Branch 3 not taken.
320 out.addVolumeVariable([](const auto& v){ return v.effectiveThermalConductivity() - v.thermalConductivity(); }, "lambda_t");
38 40 }
39
40 //! return the names of the primary variables
41 template<class ModelTraits, class FluidSystem = void>
42 124 static std::string primaryVariableName(int pvIdx, int state = 0)
43 {
44
2/2
✓ Branch 0 taken 10 times.
✓ Branch 1 taken 2 times.
124 if (pvIdx < ModelTraits::numEq() - 1)
45 98 return IsothermalIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
46 else
47 return IOName::temperature();
48 }
49 };
50
51 } // end namespace Dumux
52
53 #endif
54