GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/2p/fracture/spatialparams.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 5 14 35.7%
Functions: 3 18 16.7%
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 TwoPTests
10 * \brief The spatial parameters for a discrete fracture network embedded in an impermeable matrix.
11 */
12
13 #ifndef DUMUX_TWOP_FRACTURE_TEST_SPATIALPARAMS_HH
14 #define DUMUX_TWOP_FRACTURE_TEST_SPATIALPARAMS_HH
15
16 #include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh>
17
18 #include <dumux/porousmediumflow/fvspatialparamsmp.hh>
19 #include <dumux/porousmediumflow/2p/model.hh>
20
21 namespace Dumux {
22
23 /*!
24 * \ingroup TwoPTests
25 * \brief The spatial parameters for for a discrete fracture network embedded in an impermeable matrix.
26 */
27 template<class GridGeometry, class Scalar>
28
1/6
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
6 class FractureSpatialParams
29 : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar,
30 FractureSpatialParams<GridGeometry, Scalar>>
31 {
32 using GridView = typename GridGeometry::GridView;
33 using FVElementGeometry = typename GridGeometry::LocalView;
34 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
35 using Element = typename GridView::template Codim<0>::Entity;
36 using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar,
37 FractureSpatialParams<GridGeometry, Scalar>>;
38
39 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
40
41 using PcKrSwCurve = FluidMatrix::VanGenuchtenDefault<Scalar>;
42
43 public:
44 //! export permeability type
45 using PermeabilityType = Scalar;
46
47 6 FractureSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
48 : ParentType(gridGeometry)
49
6/18
✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 6 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 6 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 6 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 6 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.
18 , pcKrSwCurve_("SpatialParams")
50 6 {}
51
52 /*!
53 * \brief Returns the scalar intrinsic permeability \f$[m^2]\f$
54 *
55 * \param globalPos The global position
56 */
57 Scalar permeabilityAtPos(const GlobalPosition& globalPos) const
58 { return 1e-10; }
59
60 /*!
61 * \brief Returns the porosity \f$[-]\f$
62 *
63 * \param globalPos The global position
64 */
65 Scalar porosityAtPos(const GlobalPosition& globalPos) const
66 { return 0.4; }
67
68 /*!
69 * \brief Specifies how much the domain is extruded at a given position.
70 * \param globalPos The global position where to define the extrusion
71 */
72 Scalar extrusionFactorAtPos(const GlobalPosition &globalPos) const
73 { return 0.1; }
74
75 /*!
76 * \brief Returns the parameter object for the Brooks-Corey material law
77 *
78 * \param globalPos The position at which we evaluate
79 */
80 auto fluidMatrixInteractionAtPos (const GlobalPosition& globalPos) const
81 64271056 { return makeFluidMatrixInteraction(pcKrSwCurve_); }
82
83 /*!
84 * \brief Function for defining which phase is to be considered as the wetting phase.
85 *
86 * \param globalPos The global position
87 * \return The wetting phase index
88 */
89 template<class FluidSystem>
90 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
91 { return FluidSystem::phase0Idx; }
92
93 private:
94 PcKrSwCurve pcKrSwCurve_;
95 };
96
97 } // end namespace Dumux
98
99 #endif
100