GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/multidomain/facet/1p_1p/threedomain/spatialparams.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 6 12 50.0%
Functions: 6 24 25.0%
Branches: 7 30 23.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 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/18
✗ 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 taken 2 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 2 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 2 times.
✗ Branch 17 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/6
✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 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/4
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 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 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
48 { 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 Scalar extrusionFactorAtPos(const GlobalPosition& globalPos) const
56 { return extrusion_; }
57
58 private:
59 Scalar permeability_;
60 Scalar extrusion_;
61 };
62
63 } // end namespace Dumux
64
65 #endif
66