GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/test/multidomain/boundary/freeflowporenetwork/1p_1p/spatialparams_freeflow.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 7 7 100.0%
Functions: 2 2 100.0%
Branches: 7 14 50.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-FileCopyrightText: 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 BoundaryTests
10 * \brief Definition of the spatial parameters for the pore network coupled channel problem.
11 */
12
13 #ifndef DUMUX_CHANNEL_SPATIAL_PARAMS_HH
14 #define DUMUX_CHANNEL_SPATIAL_PARAMS_HH
15
16 #include <dumux/freeflow/spatialparams.hh>
17
18 namespace Dumux {
19
20 /*!
21 * \ingroup BoundaryTests
22 * \brief Definition of the spatial parameters for the pseudo 3D channel freeflow problems.
23 */
24 template<class GridGeometry, class Scalar>
25
2/4
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 3 not taken.
6 class ChannelSpatialParams
26 : public FreeFlowSpatialParams<GridGeometry, Scalar, ChannelSpatialParams<GridGeometry, Scalar>>
27 {
28 using ParentType = FreeFlowSpatialParams<GridGeometry, Scalar, ChannelSpatialParams<GridGeometry, Scalar>>;
29 using GridView = typename GridGeometry::GridView;
30 using FVElementGeometry = typename GridGeometry::LocalView;
31 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
32 using Element = typename GridView::template Codim<0>::Entity;
33 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
34
35 public:
36 12 ChannelSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
37
1/2
✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
12 : ParentType(gridGeometry)
38 {
39
1/2
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
12 extrusionFactor_ = getParam<Scalar>("FreeFlow.Problem.Height", 1.0);
40 12 }
41
42 /*!
43 * \brief Return how much the domain is extruded at a given sub-control volume.
44 */
45 template<class ElementSolution>
46 668034 Scalar extrusionFactor(const Element& element,
47 const SubControlVolume& scv,
48 const ElementSolution& elemSol) const
49
3/6
✓ Branch 1 taken 94 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 42 times.
✗ Branch 6 not taken.
✓ Branch 12 taken 54 times.
✗ Branch 13 not taken.
668034 { return extrusionFactor_; }
50
51 /*!
52 * \brief Return how much the domain is extruded at a given position.
53 */
54 Scalar extrusionFactorAtPos(const GlobalPosition& globalPos) const
55 { return extrusionFactor_; }
56
57 private:
58 Scalar extrusionFactor_;
59 };
60
61 } // end namespace Dumux
62
63 #endif
64