GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/multidomain/facet/1p_1p/linearprofile/spatialparams.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 6 12 50.0%
Functions: 6 24 25.0%
Branches: 6 24 25.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-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_ONEP_SPATIALPARAMS_HH
14 #define DUMUX_TEST_TPFAFACETCOUPLING_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
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 6 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 6 times.
✗ Branch 11 not taken.
12 class OnePSpatialParams
26 : public FVPorousMediumFlowSpatialParamsOneP< GridGeometry, Scalar, OnePSpatialParams<GridGeometry, Scalar> >
27 {
28 using ThisType = OnePSpatialParams< GridGeometry, Scalar >;
29 using ParentType = FVPorousMediumFlowSpatialParamsOneP< GridGeometry, Scalar, ThisType >;
30
31 using GridView = typename GridGeometry::GridView;
32 using Element = typename GridView::template Codim<0>::Entity;
33 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
34
35 public:
36 //! Export the type used for permeabilities
37 using PermeabilityType = Scalar;
38
39 24 OnePSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry, const std::string& paramGroup = "")
40
2/6
✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
24 : ParentType(gridGeometry)
41 {
42
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
24 permeability_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Permeability");
43
1/4
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
24 extrusion_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Aperture", 1.0);
44 24 }
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 PermeabilityType permeability_;
60 Scalar extrusion_;
61 };
62
63 } // end namespace Dumux
64
65 #endif
66