GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/2p/rotationsymmetry/problem.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 11 13 84.6%
Functions: 1 2 50.0%
Branches: 8 20 40.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 #ifndef DUMUX_TEST_TWOP_ROTATIONALSYMMETRY_PROBLEM_HH
9 #define DUMUX_TEST_TWOP_ROTATIONALSYMMETRY_PROBLEM_HH
10
11 #include <dumux/common/properties.hh>
12 #include <dumux/common/boundarytypes.hh>
13 #include <dumux/porousmediumflow/problem.hh>
14
15 namespace Dumux {
16
17 /*!
18 * \brief A rotational symmetric 2p problem: water and air separate in a density-driven process in a dome shaped domain
19 */
20 template<class TypeTag>
21 1 class TwoPRotationalSymmetryProblem : public PorousMediumFlowProblem<TypeTag>
22 {
23 using ParentType = PorousMediumFlowProblem<TypeTag>;
24 using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
25 using Element = typename GridView::template Codim<0>::Entity;
26 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
27 using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
28 using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
29 using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
30 using BoundaryTypes = Dumux::BoundaryTypes<PrimaryVariables::size()>;
31 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
32
33 public:
34 1 TwoPRotationalSymmetryProblem(std::shared_ptr<const GridGeometry> gridGeometry)
35
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 1 times.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
3 : ParentType(gridGeometry)
36 {
37
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 FluidSystem::init(/*tempMin=*/293.0, /*tempMax=*/294.0, /*numTemp=*/2,
38 /*pMin=*/1.0e4, /*pMax=*/1.0e6, /*numP=*/200);
39 1 }
40
41 /*!
42 * \brief The boundary types at position globalPos
43 */
44 BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
45 {
46 110160 BoundaryTypes values;
47
1/2
✓ Branch 0 taken 110160 times.
✗ Branch 1 not taken.
110160 values.setAllNeumann();
48 return values;
49 }
50
51 /*!
52 * \brief The initial values at position globalPos
53 */
54 PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
55 {
56 418 PrimaryVariables values;
57 1672 const Scalar depth = this->gridGeometry().bBoxMax()[1] - globalPos[1];
58 // hydrostatic pressure
59 1672 values[0] = 1e5 - 1000*this->spatialParams().gravity(globalPos)[1]*depth;
60 // start with saturation 0.5 -> density driven demixing
61 836 values[1] = 0.5;
62 return values;
63 }
64
65
66 };
67
68 } // end namespace Dumux
69
70 #endif
71