GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/1pnc/nonequilibrium/spatialparams.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 8 16 50.0%
Functions: 2 10 20.0%
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 #include <dumux/porousmediumflow/fvspatialparamsnonequilibrium.hh>
19 #include <dumux/material/fluidmatrixinteractions/1pia/fluidsolidinterfacialareashiwang.hh>
20
21 namespace Dumux {
22
23 /*!
24 * \ingroup OnePNCTests
25 * \brief Definition of the spatial parameters for the 1pnc test problems.
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 2 times.
✗ Branch 5 not taken.
2 class OnePNCNonequilibriumTestSpatialParams
29 : public FVPorousMediumFlowSpatialParamsNonEquilibrium<GridGeometry, Scalar,
30 OnePNCNonequilibriumTestSpatialParams<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 = FVPorousMediumFlowSpatialParamsNonEquilibrium<GridGeometry, Scalar,
37 OnePNCNonequilibriumTestSpatialParams<GridGeometry, Scalar>>;
38
39 static const int dimWorld = GridView::dimensionworld;
40 using GlobalPosition = typename Dune::FieldVector<Scalar, dimWorld>;
41
42 public:
43 // export permeability type
44 using PermeabilityType = Scalar;
45 using FluidSolidInterfacialAreaFormulation = FluidSolidInterfacialAreaShiWang<Scalar>;
46
47 2 OnePNCNonequilibriumTestSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
48
2/6
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
2 : ParentType(gridGeometry)
49 {
50 2 permeability_ = 1e-11;
51 2 porosity_ = 0.4;
52
53 2 characteristicLength_ = 5e-4;
54 2 factorEnergyTransfer_ = 0.5;
55 2 }
56
57 /*!
58 * \brief Defines the intrinsic permeability \f$\mathrm{[m^2]}\f$.
59 *
60 * \param globalPos The global position
61 */
62 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
63 { return permeability_; }
64
65 /*!
66 * \brief Defines the porosity \f$\mathrm{[-]}\f$.
67 *
68 * \param globalPos The global position
69 */
70 Scalar porosityAtPos(const GlobalPosition& globalPos) const
71 { return porosity_; }
72
73 /*!
74 * \brief Returns the characteristic length for the mass transfer.
75 *
76 * \param globalPos The position in global coordinates.
77 */
78 const Scalar characteristicLengthAtPos(const GlobalPosition & globalPos) const
79 { return characteristicLength_ ; }
80
81 /*!
82 * \brief Return the pre factor the the energy transfer.
83 *
84 * \param globalPos The position in global coordinates.
85 */
86 const Scalar factorEnergyTransferAtPos(const GlobalPosition & globalPos) const
87 { return factorEnergyTransfer_; }
88
89 private:
90 Scalar permeability_;
91 Scalar porosity_;
92
93 Scalar factorEnergyTransfer_ ;
94 Scalar characteristicLength_ ;
95 };
96
97 } // end namespace Dumux
98
99 #endif
100