GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/multidomain/facet/1pnc_1pnc/spatialparams.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 7 15 46.7%
Functions: 10 50 20.0%
Branches: 9 38 23.7%

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 The spatial parameters for the compositional single-phase facet coupling test.
11 */
12 #ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_SPATIALPARAMS_HH
13 #define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_SPATIALPARAMS_HH
14
15 #include <dumux/porousmediumflow/fvspatialparams1p.hh>
16
17 namespace Dumux {
18
19 /*!
20 * \ingroup FacetTests
21 * \brief The spatial parameters for the compositional single-phase facet coupling test.
22 */
23 template< class GridGeometry, class Scalar >
24
4/24
✗ 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 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 13 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 13 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 13 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 13 times.
✗ Branch 23 not taken.
52 class OnePSpatialParams
25 : public FVPorousMediumFlowSpatialParamsOneP< GridGeometry, Scalar, OnePSpatialParams<GridGeometry, Scalar> >
26 {
27 using ThisType = OnePSpatialParams< GridGeometry, Scalar >;
28 using ParentType = FVPorousMediumFlowSpatialParamsOneP< GridGeometry, Scalar, ThisType >;
29
30 using GridView = typename GridGeometry::GridView;
31 using Element = typename GridView::template Codim<0>::Entity;
32 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
33
34 public:
35 //! Export the type used for permeabilities
36 using PermeabilityType = Scalar;
37
38 52 OnePSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry, const std::string& paramGroup = "")
39
2/6
✓ Branch 2 taken 26 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 26 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
52 : ParentType(gridGeometry)
40 {
41
1/2
✓ Branch 1 taken 26 times.
✗ Branch 2 not taken.
52 permeability_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Permeability");
42
1/2
✓ Branch 1 taken 26 times.
✗ Branch 2 not taken.
52 porosity_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Porosity");
43
1/4
✓ Branch 1 taken 26 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
52 extrusion_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Aperture", 1.0);
44 52 }
45
46 //! Function for defining the (intrinsic) permeability \f$[m^2]\f$.
47 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
48 { return permeability_; }
49
50 //! Returns the porosity
51 Scalar porosityAtPos(const GlobalPosition& globalPos) const
52 { return porosity_; }
53
54 //! Returns the extrusion factor
55 Scalar extrusionFactorAtPos(const GlobalPosition& globalPos) const
56 { return extrusion_; }
57
58 //! Returns the temperature at the given position
59 Scalar temperatureAtPos(const GlobalPosition& globalPos) const
60 { return 283.15; }
61
62 private:
63 PermeabilityType permeability_;
64 Scalar porosity_;
65 Scalar extrusion_;
66 };
67
68 } // end namespace Dumux
69
70 #endif
71