GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/multidomain/boundary/stokesdarcy/1p_1p/spatialparams.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 6 12 50.0%
Functions: 1 4 25.0%
Branches: 5 18 27.8%

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 BoundaryTests
10 * \brief The spatial parameters class for the test problem using the 1p cc model.
11 */
12
13 #ifndef DUMUX_1P_TEST_SPATIALPARAMS_HH
14 #define DUMUX_1P_TEST_SPATIALPARAMS_HH
15
16 #include <dumux/porousmediumflow/fvspatialparams1p.hh>
17
18 namespace Dumux {
19
20 /*!
21 * \ingroup BoundaryTests
22 * \brief The spatial parameters class for the test problem using the
23 * 1p cc model.
24 */
25 template<class GridGeometry, class Scalar>
26
1/6
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
2 class OnePSpatialParams
27 : public FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar,
28 OnePSpatialParams<GridGeometry, Scalar>>
29 {
30 using GridView = typename GridGeometry::GridView;
31 using ParentType = FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar,
32 OnePSpatialParams<GridGeometry, Scalar>>;
33
34 using Element = typename GridView::template Codim<0>::Entity;
35 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
36
37 public:
38 // export permeability type
39 using PermeabilityType = Scalar;
40
41 2 OnePSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
42
2/8
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
2 : ParentType(gridGeometry)
43 {
44
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 permeability_ = getParam<Scalar>("Darcy.SpatialParams.Permeability");
45
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 alphaBJ_ = getParam<Scalar>("Darcy.SpatialParams.AlphaBeaversJoseph");
46 2 }
47
48 /*!
49 * \brief Function for defining the (intrinsic) permeability \f$[m^2]\f$.
50 *
51 * \param globalPos The global position
52 * \return the intrinsic permeability
53 */
54 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
55 { return permeability_; }
56
57 /*! \brief Defines the porosity in [-].
58 *
59 * \param globalPos The global position
60 */
61 Scalar porosityAtPos(const GlobalPosition& globalPos) const
62 { return 0.4; }
63
64 /*! \brief Defines the Beavers-Joseph coefficient in [-].
65 *
66 * \param globalPos The global position
67 */
68 Scalar beaversJosephCoeffAtPos(const GlobalPosition& globalPos) const
69 { return alphaBJ_; }
70
71
72 private:
73 Scalar permeability_;
74 Scalar alphaBJ_;
75 };
76
77 } // end namespace Dumux
78
79 #endif
80