GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/3p/conduction/spatialparams.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 7 12 58.3%
Functions: 2 8 25.0%
Branches: 7 24 29.2%

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 ThreePTests
10 * \brief Definition of the spatial parameters for the 3pni problems.
11 */
12
13 #ifndef DUMUX_THREEPNI_SPATIAL_PARAMS_HH
14 #define DUMUX_THREEPNI_SPATIAL_PARAMS_HH
15
16 #include <dumux/porousmediumflow/properties.hh>
17 #include <dumux/porousmediumflow/fvspatialparamsmp.hh>
18 #include <dumux/material/fluidmatrixinteractions/3p/parkervangenuchten.hh>
19
20 namespace Dumux {
21
22 /*!
23 * \ingroup ThreePTests
24 * \brief Definition of the spatial parameters for the 3pni problems.
25 */
26 template<class GridGeometry, class Scalar>
27
1/6
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
4 class ThreePNISpatialParams
28 : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar,
29 ThreePNISpatialParams<GridGeometry, Scalar>>
30 {
31 using GridView = typename GridGeometry::GridView;
32 using FVElementGeometry = typename GridGeometry::LocalView;
33 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
34 using Element = typename GridView::template Codim<0>::Entity;
35 using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar,
36 ThreePNISpatialParams<GridGeometry, Scalar>>;
37
38 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
39
40 using ThreePhasePcKrSw = FluidMatrix::ParkerVanGenuchten3PDefault<Scalar>;
41
42 public:
43 //! Export permeability type
44 using PermeabilityType = Scalar;
45
46 4 ThreePNISpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
47 : ParentType(gridGeometry)
48
6/18
✓ 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 13 taken 4 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
12 , pcKrSwCurve_("SpatialParams")
49 {
50 4 permeability_ = 1e-10;
51 4 porosity_ = 0.4;
52 4 }
53
54 /*!
55 * \brief Returns the scalar intrinsic permeability \f$[m^2]\f$
56 *
57 * \param globalPos The global position
58 */
59 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
60 {
61 return permeability_;
62 }
63
64 /*!
65 * \brief Returns the porosity \f$[-]\f$
66 *
67 * \param globalPos The global position
68 */
69 Scalar porosityAtPos(const GlobalPosition& globalPos) const
70 {
71 return porosity_;
72 }
73
74 /*!
75 * \brief Returns the fluid-matrix interaction law at a given location
76 *
77 * \param globalPos The global coordinates for the given location
78 */
79 auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const
80 {
81 2833680 return makeFluidMatrixInteraction(pcKrSwCurve_);
82 }
83
84 private:
85
86 const ThreePhasePcKrSw pcKrSwCurve_;
87 Scalar permeability_;
88 Scalar porosity_;
89 };
90
91 } // end namespace Dumux
92
93 #endif
94