GCC Code Coverage Report


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