GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/solidenergy/spatialparams.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 3 5 60.0%
Functions: 1 2 50.0%
Branches: 4 18 22.2%

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 SolidEnergyTests
10 * \brief Definition of the spatial parameters for the solid energy test
11 */
12 #ifndef DUMUX_TEST_SOLIDENERGY_SPATIAL_PARAMS_HH
13 #define DUMUX_TEST_SOLIDENERGY_SPATIAL_PARAMS_HH
14
15 #include <dumux/porousmediumflow/fvspatialparams1p.hh>
16
17 namespace Dumux {
18
19 /*!
20 * \ingroup OnePTests
21 * \brief Definition of the spatial parameters for the solid energy test
22 */
23 template<class GridGeometry, class Scalar>
24
2/12
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
2 class SolidEnergySpatialParams
25 : public FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar,
26 SolidEnergySpatialParams<GridGeometry, Scalar>>
27 {
28 using GridView = typename GridGeometry::GridView;
29 using ParentType = FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar,
30 SolidEnergySpatialParams<GridGeometry, Scalar>>;
31
32 using Element = typename GridView::template Codim<0>::Entity;
33 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
34
35 public:
36 1 SolidEnergySpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
37
2/6
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
2 : ParentType(gridGeometry) {}
38
39 /*!
40 * \brief Define the porosity \f$\mathrm{[-]}\f$.
41 * \param globalPos The global position
42 */
43 Scalar porosityAtPos(const GlobalPosition& globalPos) const
44 { return 0.4; }
45 };
46
47 } // end namespace Dumux
48
49 #endif
50