GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/multidomain/facet/tracer_tracer/tracerfluidsystem.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 2 6 33.3%
Functions: 6 18 33.3%
Branches: 2 6 33.3%

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-FileCopyrightInfo: 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 FacetTests
10 * \brief Fluid system for the tracer facet coupling test.
11 */
12
13 #ifndef DUMUX_TEST_TPFAFACETCOUPLING_TRACER_FLUIDSYSTEM_HH
14 #define DUMUX_TEST_TPFAFACETCOUPLING_TRACER_FLUIDSYSTEM_HH
15
16 #include <dumux/common/properties.hh>
17 #include <dumux/material/fluidsystems/base.hh>
18
19 namespace Dumux {
20
21 //! A simple fluid system with one tracer component
22 template<class TypeTag>
23 class TracerFluidSystem : public FluidSystems::Base<GetPropType<TypeTag, Properties::Scalar>,
24 TracerFluidSystem<TypeTag>>
25 {
26 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
27 using Problem = GetPropType<TypeTag, Properties::Problem>;
28 using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
29 using Element = typename GridView::template Codim<0>::Entity;
30 using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView;
31 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
32
33 public:
34 //! If the fluid system only contains tracer components
35 static constexpr bool isTracerFluidSystem()
36 { return true; }
37
38 //! The number of components
39 static constexpr int numComponents = 1;
40
41 //! Human readable component name (index compIdx) (for vtk output)
42 24 static std::string componentName(int compIdx)
43
2/6
✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
24 { return "tracer_" + std::to_string(compIdx); }
44
45 //! Human readable phase name (index phaseIdx) (for velocity vtk output)
46 static std::string phaseName(int phaseIdx = 0)
47 { return "Groundwater"; }
48
49 //! Molar mass in kg/mol of the component with index compIdx
50 static Scalar molarMass(unsigned int compIdx)
51 { return 0.300; }
52
53 //! Binary diffusion coefficient
54 //! (might depend on spatial parameters like pressure / temperature)
55 static Scalar binaryDiffusionCoefficient(unsigned int compIdx,
56 const Problem& problem,
57 const Element& element,
58 const SubControlVolume& scv)
59 { return 0.0; }
60 };
61
62 } // end namespace Dumux
63
64 #endif
65