GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/1pnc/1p2c/spatialparams.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 6 10 60.0%
Functions: 7 21 33.3%
Branches: 3 12 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 OnePNCTests
10 * \brief Definition of the spatial parameters for the 1pnc problems.
11 */
12
13 #ifndef DUMUX_1PNC_TEST_SPATIAL_PARAMS_HH
14 #define DUMUX_1PNC_TEST_SPATIAL_PARAMS_HH
15
16 #include <dumux/porousmediumflow/properties.hh>
17 #include <dumux/porousmediumflow/fvspatialparams1p.hh>
18
19 namespace Dumux {
20
21 /*!
22 * \ingroup OnePNCTests
23 * \brief Definition of the spatial parameters for the 1pnc test problems.
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 18 times.
✗ Branch 5 not taken.
18 class OnePNCTestSpatialParams
27 : public FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar,
28 OnePNCTestSpatialParams<GridGeometry, Scalar>>
29 {
30 using GridView = typename GridGeometry::GridView;
31 using FVElementGeometry = typename GridGeometry::LocalView;
32 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
33 using Element = typename GridView::template Codim<0>::Entity;
34 using ParentType = FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar,
35 OnePNCTestSpatialParams<GridGeometry, Scalar>>;
36
37 static const int dimWorld = GridView::dimensionworld;
38 using GlobalPosition = typename Dune::FieldVector<Scalar, dimWorld>;
39
40 public:
41 // export permeability type
42 using PermeabilityType = Scalar;
43
44 18 OnePNCTestSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
45
2/6
✓ Branch 2 taken 18 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 18 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
18 : ParentType(gridGeometry)
46 {
47 18 permeability_ = 1e-10;
48 18 porosity_ = 0.4;
49 18 }
50
51 /*!
52 * \brief Defines the intrinsic permeability \f$\mathrm{[m^2]}\f$.
53 *
54 * \param globalPos The global position
55 */
56 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
57 { return permeability_; }
58
59 /*!
60 * \brief Defines the porosity \f$\mathrm{[-]}\f$.
61 *
62 * \param globalPos The global position
63 */
64 Scalar porosityAtPos(const GlobalPosition& globalPos) const
65 { return porosity_; }
66
67 private:
68 Scalar permeability_;
69 Scalar porosity_;
70 };
71
72 } // end namespace Dumux
73
74 #endif
75