GCC Code Coverage Report


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