GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/multidomain/embedded/1d3d/1p_1p/spatialparams_tissue.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 6 10 60.0%
Functions: 2 6 33.3%
Branches: 4 16 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 EmbeddedTests
10 * \brief Definition of the spatial parameters for the tissue problem.
11 */
12
13 #ifndef DUMUX_TISSUE_SPATIAL_PARAMS_HH
14 #define DUMUX_TISSUE_SPATIAL_PARAMS_HH
15
16 #include <dumux/porousmediumflow/fvspatialparams1p.hh>
17
18 namespace Dumux {
19
20 /*!
21 * \ingroup EmbeddedTests
22 * \brief Definition of the spatial parameters for the tissue problem.
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 19 times.
✗ Branch 5 not taken.
19 class TissueSpatialParams
26 : public FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar, TissueSpatialParams<GridGeometry, Scalar>>
27 {
28 using ThisType = TissueSpatialParams<GridGeometry, Scalar>;
29 using ParentType = FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar, ThisType>;
30 using GridView = typename GridGeometry::GridView;
31 using Element = typename GridView::template Codim<0>::Entity;
32 using SubControlVolume = typename GridGeometry::SubControlVolume;
33 public:
34 // export permeability type
35 using PermeabilityType = Scalar;
36
37 19 TissueSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
38
2/8
✓ Branch 2 taken 19 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 19 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
19 : ParentType(gridGeometry)
39 {
40
1/2
✓ Branch 1 taken 19 times.
✗ Branch 2 not taken.
19 permeability_ = getParam<Scalar>("SpatialParams.PermeabilityTissue");
41 19 porosity_ = 1.0;
42 19 }
43
44 /*!
45 * \brief Defines the intrinsic permeability \f$\mathrm{[m^2]}\f$.
46 *
47 * \param element The element
48 * \param scv The sub control volume
49 * \param elemSol The element solution vector
50 */
51 template<class ElementSolution>
52 PermeabilityType permeability(const Element& element,
53 const SubControlVolume& scv,
54 const ElementSolution& elemSol) const
55 {
56 return permeability_;
57 }
58
59 /*!
60 * \brief Defines the porosity \f$\mathrm{[-]}\f$.
61 *
62 * \param element The current finite element
63 * \param scv The sub control volume
64 * \param elemSol The current element solution vector
65 */
66 template<class ElementSolution>
67 Scalar porosity(const Element& element,
68 const SubControlVolume& scv,
69 const ElementSolution& elemSol) const
70 {
71 return porosity_;
72 }
73
74 private:
75 Scalar permeability_;
76 Scalar porosity_;
77 };
78
79 } // end namespace Dumux
80
81 #endif
82