GCC Code Coverage Report


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