GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/richards/annulus/spatialparams.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 9 14 64.3%
Functions: 1 4 25.0%
Branches: 32 68 47.1%

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 #ifndef DUMUX_RICHARDS_ANNULUS_SPATIAL_PARAMETERS_HH
9 #define DUMUX_RICHARDS_ANNULUS_SPATIAL_PARAMETERS_HH
10
11 #include <iostream>
12 #include <dumux/common/parameters.hh>
13
14 #include <dumux/porousmediumflow/fvspatialparamsmp.hh>
15 #include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh>
16
17 namespace Dumux {
18
19 /*!
20 * \ingroup RichardsTests
21 * \brief Spatial parameters for the Richards benchmarks
22 */
23 template<class GridGeometry, class Scalar>
24 class RichardsAnnulusSpatialParams
25 : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, RichardsAnnulusSpatialParams<GridGeometry, Scalar>>
26 {
27 using ThisType = RichardsAnnulusSpatialParams<GridGeometry, Scalar>;
28 using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, ThisType>;
29 using GridView = typename GridGeometry::GridView;
30 using GlobalPosition = typename GridView::template Codim<0>::Geometry::GlobalCoordinate;
31 using PcKrSwCurve = FluidMatrix::VanGenuchtenDefault<Scalar>;
32
33 public:
34 // export permeability type
35 using PermeabilityType = Scalar;
36
37 4 RichardsAnnulusSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
38 : ParentType(gridGeometry)
39 , paramGroup_("SpatialParams." + getParam<std::string>("SpatialParams.SoilType"))
40 4 , pcKrSwCurve_(paramGroup_)
41
2/6
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
4 , permeability_(getParam<Scalar>(paramGroup_ + ".Permeability"))
42
10/28
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 4 times.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
✓ Branch 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
20 , porosity_(getParam<Scalar>(paramGroup_ + ".Porosity"))
43 {
44
6/18
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 4 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 4 times.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✓ Branch 15 taken 4 times.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
16 std::cout << "Using " << getParam<std::string>(paramGroup_ + ".Name") << " parameters" << std::endl;
45 4 }
46
47 /*!
48 * \brief Returns the intrinsic permeability tensor [m^2] at a given location
49 */
50 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
51 { return permeability_; }
52
53 /*!
54 * \brief Returns the porosity [-] at a given location
55 */
56 Scalar porosityAtPos(const GlobalPosition& globalPos) const
57 { return porosity_; }
58
59 /*!
60 * \brief Returns the fluid-matrix interaction law for the sub-control volume
61 */
62 auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const
63
12/12
✓ Branch 0 taken 123121 times.
✓ Branch 1 taken 8279 times.
✓ Branch 2 taken 123121 times.
✓ Branch 3 taken 8279 times.
✓ Branch 4 taken 123121 times.
✓ Branch 5 taken 8279 times.
✓ Branch 6 taken 123121 times.
✓ Branch 7 taken 8279 times.
✓ Branch 10 taken 16567 times.
✓ Branch 11 taken 632033 times.
✓ Branch 12 taken 16567 times.
✓ Branch 13 taken 632033 times.
3610800 { return makeFluidMatrixInteraction(pcKrSwCurve_); }
64
65 /*!
66 * \brief material law for analytic solution
67 */
68
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
739348199 const PcKrSwCurve& pcKrSwCurve() const { return pcKrSwCurve_; }
69
70 /*!
71 * \brief the parameter group selecting the soil type
72 */
73
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 const std::string& paramGroup() const { return paramGroup_; }
74
75 private:
76 std::string paramGroup_;
77 const PcKrSwCurve pcKrSwCurve_;
78 const Scalar permeability_, porosity_;
79 };
80
81 } // end namespace Dumux
82
83 #endif
84