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 PoromechanicsTests | ||
10 | * \brief The poro-elastic sub-problem in the el2p coupled problem. | ||
11 | */ | ||
12 | #ifndef DUMUX_POROELASTIC_SUBPROBLEM_HH | ||
13 | #define DUMUX_POROELASTIC_SUBPROBLEM_HH | ||
14 | |||
15 | #include <dune/common/fmatrix.hh> | ||
16 | |||
17 | #include <dumux/common/properties.hh> | ||
18 | #include <dumux/common/parameters.hh> | ||
19 | #include <dumux/common/boundarytypes.hh> | ||
20 | |||
21 | #include <dumux/geomechanics/fvproblem.hh> | ||
22 | |||
23 | namespace Dumux { | ||
24 | |||
25 | /*! | ||
26 | * \ingroup PoromechanicsTests | ||
27 | * \brief The poro-elastic sub-problem in the el2p coupled problem. | ||
28 | */ | ||
29 | template<class TypeTag> | ||
30 | class PoroElasticSubProblem : public GeomechanicsFVProblem<TypeTag> | ||
31 | { | ||
32 | using ParentType = GeomechanicsFVProblem<TypeTag>; | ||
33 | |||
34 | using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; | ||
35 | using Scalar = GetPropType<TypeTag, Properties::Scalar>; | ||
36 | using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; | ||
37 | using BoundaryTypes = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; | ||
38 | using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; | ||
39 | using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView; | ||
40 | |||
41 | using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; | ||
42 | using FVElementGeometry = typename GridGeometry::LocalView; | ||
43 | using SubControlVolume = typename GridGeometry::SubControlVolume; | ||
44 | |||
45 | using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView; | ||
46 | using Element = typename GridView::template Codim<0>::Entity; | ||
47 | using GlobalPosition = typename Element::Geometry::GlobalCoordinate; | ||
48 | |||
49 | static constexpr int dim = GridView::dimension; | ||
50 | static constexpr int dimWorld = GridView::dimensionworld; | ||
51 | using GradU = Dune::FieldMatrix<Scalar, dim, dimWorld>; | ||
52 | |||
53 | public: | ||
54 | 2 | PoroElasticSubProblem(std::shared_ptr<const GridGeometry> gridGeometry, | |
55 | std::shared_ptr<GetPropType<TypeTag, Properties::SpatialParams>> spatialParams, | ||
56 | const std::string& paramGroup = "PoroElastic") | ||
57 |
4/12✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 2 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | : ParentType(gridGeometry, spatialParams, paramGroup) |
58 | { | ||
59 |
9/26✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✓ Branch 17 taken 2 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 2 times.
✗ Branch 20 not taken.
✓ Branch 21 taken 2 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 2 times.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
|
4 | problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name"); |
60 | 2 | } | |
61 | |||
62 | /*! | ||
63 | * \brief The problem name. | ||
64 | */ | ||
65 | const std::string& name() const | ||
66 | { | ||
67 |
1/2✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
|
2 | return problemName_; |
68 | } | ||
69 | |||
70 | //! Evaluates the initial value for a control volume. | ||
71 | ✗ | PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const | |
72 | 500 | { return PrimaryVariables(0.0); } | |
73 | |||
74 | //! Evaluates the boundary conditions for a Dirichlet boundary segment. | ||
75 | ✗ | PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const | |
76 | 15984 | { return PrimaryVariables(0.0); } | |
77 | |||
78 | //! Evaluates the boundary conditions for a Neumann boundary segment. | ||
79 | ✗ | PrimaryVariables neumannAtPos(const GlobalPosition& globalPos) const | |
80 | ✗ | { return PrimaryVariables(0.0); } | |
81 | |||
82 | /*! | ||
83 | * \brief Specifies which kind of boundary condition should be | ||
84 | * used for which equation on a given boundary segment. | ||
85 | * | ||
86 | * \param globalPos The global position | ||
87 | */ | ||
88 | ✗ | BoundaryTypes boundaryTypesAtPos(const GlobalPosition& globalPos) const | |
89 | { | ||
90 | 21904 | BoundaryTypes values; | |
91 |
2/2✓ Branch 0 taken 4144 times.
✓ Branch 1 taken 17760 times.
|
21904 | values.setAllDirichlet(); |
92 | ✗ | return values; | |
93 | } | ||
94 | |||
95 | /*! | ||
96 | * \brief Evaluates the source term for all phases within a given | ||
97 | * sub-control volume. | ||
98 | */ | ||
99 | ✗ | PrimaryVariables source(const Element& element, | |
100 | const FVElementGeometry& fvGeometry, | ||
101 | const ElementVolumeVariables& elemVolVars, | ||
102 | const SubControlVolume& scv) const | ||
103 | 784384 | { return PrimaryVariables(0.0); } | |
104 | |||
105 | ✗ | void setTime(Scalar t) const | |
106 | 40 | { time_ = t; } | |
107 | |||
108 | private: | ||
109 | static constexpr Scalar eps_ = 3e-6; | ||
110 | std::string problemName_; | ||
111 | mutable Scalar time_ = 0; | ||
112 | }; | ||
113 | |||
114 | } // end namespace Dumux | ||
115 | |||
116 | #endif | ||
117 |