GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/porousmediumflow/fvspatialparamsnonequilibrium.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 7 10 70.0%
Functions: 5 19 26.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 SpatialParameters
10 * \brief Base class for spatial parameters dealing with thermal and chemical non-equilibrium
11 *
12 */
13 #ifndef DUMUX_POROUS_MEDIUM_FLOW_FV_SPATIAL_PARAMS_NONEQUILIBRIUM_HH
14 #define DUMUX_POROUS_MEDIUM_FLOW_FV_SPATIAL_PARAMS_NONEQUILIBRIUM_HH
15
16 #include "fvspatialparamsmp.hh"
17
18 namespace Dumux {
19
20 /*!
21 * \ingroup SpatialParameters
22 * \brief Definition of the spatial parameters for non-equilibrium
23 */
24 template<class GridGeometry, class Scalar, class Implementation>
25
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 FVPorousMediumFlowSpatialParamsNonEquilibrium
26 : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, Implementation>
27 {
28 using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, Implementation>;
29 using GridView = typename GridGeometry::GridView;
30 using FVElementGeometry = typename GridGeometry::LocalView;
31 using SubControlVolume = typename GridGeometry::SubControlVolume;
32 using Element = typename GridView::template Codim<0>::Entity;
33 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
34
35 public:
36 //! export the types used for interfacial area calculations
37 using AwnSurfaceParams = Scalar;
38 using AwsSurfaceParams = Scalar;
39 using AnsSurfaceParams = Scalar;
40
41 5 FVPorousMediumFlowSpatialParamsNonEquilibrium(std::shared_ptr<const GridGeometry> gridGeometry)
42
2/6
✓ Branch 2 taken 5 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
5 : ParentType(gridGeometry)
43 5 {}
44
45 /*!
46 * \brief Return the characteristic length for the mass transfer.
47 *
48 * The position is determined based on the coordinate of
49 * the vertex belonging to the considered sub control volume.
50 */
51 template<class ElementSolution>
52 const Scalar characteristicLength(const Element & element,
53 const SubControlVolume &scv,
54 const ElementSolution &elemSol) const
55
56 4385582 { return this->asImp_().characteristicLengthAtPos(scv.dofPosition()); }
57
58 /*!
59 * \brief Return the characteristic length for the mass transfer.
60 *
61 * \param globalPos The position in global coordinates.
62 */
63 const Scalar characteristicLengthAtPos(const GlobalPosition& globalPos) const
64 {
65 DUNE_THROW(Dune::InvalidStateException,
66 "The spatial parameters do not provide "
67 "a characteristicLengthAtPos() method.");
68 }
69
70 /*!
71 * \brief Return the pre-factor the the energy transfer
72 *
73 * The position is determined based on the coordinate of
74 * the vertex belonging to the considered sub control volume.
75 */
76 template<class ElementSolution>
77 const Scalar factorEnergyTransfer(const Element& element,
78 const SubControlVolume& scv,
79 const ElementSolution& elemSol) const
80 3590046 { return this->asImp_().factorEnergyTransferAtPos(scv.dofPosition()); }
81
82 /*!
83 * \brief Return the pre factor the the energy transfer
84 * \param globalPos The position in global coordinates.
85 */
86 const Scalar factorEnergyTransferAtPos(const GlobalPosition& globalPos) const
87 {
88 DUNE_THROW(Dune::InvalidStateException,
89 "The spatial parameters do not provide "
90 "a factorEnergyTransferAtPos() method.");
91 }
92
93 /*!
94 * \brief Return the pre-factor the the mass transfer
95 *
96 * The position is determined based on the coordinate of
97 * the vertex belonging to the considered sub control volume.
98 */
99 template<class ElementSolution>
100 const Scalar factorMassTransfer(const Element& element,
101 const SubControlVolume& scv,
102 const ElementSolution& elemSol) const
103 2408336 { return this->asImp_().factorMassTransferAtPos(scv.dofPosition()); }
104
105
106 /*!
107 * \brief Return the pre-factor the the mass transfer
108 * \param globalPos The position in global coordinates.
109 */
110 const Scalar factorMassTransferAtPos(const GlobalPosition& globalPos) const
111 {
112 DUNE_THROW(Dune::InvalidStateException,
113 "The spatial parameters do not provide "
114 "a factorMassTransferAtPos() method.");
115 }
116 };
117
118 } // end namespace Dumux
119
120 #endif
121