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 el1p coupled problem. | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_POROELASTIC_SUBPROBLEM_HH | ||
14 | #define DUMUX_POROELASTIC_SUBPROBLEM_HH | ||
15 | |||
16 | #include <dune/common/fmatrix.hh> | ||
17 | |||
18 | #include <dumux/common/properties.hh> | ||
19 | #include <dumux/common/parameters.hh> | ||
20 | #include <dumux/common/boundarytypes.hh> | ||
21 | |||
22 | #include <dumux/geomechanics/fvproblem.hh> | ||
23 | |||
24 | namespace Dumux { | ||
25 | |||
26 | /*! | ||
27 | * \ingroup PoromechanicsTests | ||
28 | * \brief The poro-elastic sub-problem in the el1p coupled problem. | ||
29 | */ | ||
30 | template<class TypeTag> | ||
31 | class PoroElasticSubProblem : public GeomechanicsFVProblem<TypeTag> | ||
32 | { | ||
33 | using ParentType = GeomechanicsFVProblem<TypeTag>; | ||
34 | |||
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 | 1 | 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 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
3 | : ParentType(gridGeometry, spatialParams, paramGroup) |
58 | { | ||
59 |
9/26✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✓ Branch 17 taken 1 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 21 taken 1 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 1 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.
|
2 | problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name"); |
60 | 1 | } | |
61 | |||
62 | /*! | ||
63 | * \brief The problem name. | ||
64 | */ | ||
65 | const std::string& name() const | ||
66 | { | ||
67 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | return problemName_; |
68 | } | ||
69 | //! Evaluates the initial value for a control volume. | ||
70 | ✗ | PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const | |
71 | ✗ | { return PrimaryVariables(0.0); } | |
72 | |||
73 | //! Evaluates the boundary conditions for a Dirichlet boundary segment. | ||
74 | ✗ | PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const | |
75 | 456 | { return PrimaryVariables(0.0); } | |
76 | |||
77 | //! Evaluates the boundary conditions for a Neumann boundary segment. | ||
78 | ✗ | PrimaryVariables neumannAtPos(const GlobalPosition& globalPos) const | |
79 | ✗ | { return PrimaryVariables(0.0); } | |
80 | |||
81 | /*! | ||
82 | * \brief Specifies which kind of boundary condition should be | ||
83 | * used for which equation on a given boundary segment. | ||
84 | * | ||
85 | * \param globalPos The global position | ||
86 | */ | ||
87 | ✗ | BoundaryTypes boundaryTypesAtPos(const GlobalPosition& globalPos) const | |
88 | { | ||
89 | 228 | BoundaryTypes values; | |
90 |
2/2✓ Branch 0 taken 108 times.
✓ Branch 1 taken 120 times.
|
228 | values.setAllDirichlet(); |
91 | ✗ | return values; | |
92 | } | ||
93 | |||
94 | /*! | ||
95 | * \brief Evaluates the source term for all phases within a given | ||
96 | * sub-control volume. | ||
97 | */ | ||
98 | ✗ | PrimaryVariables source(const Element& element, | |
99 | const FVElementGeometry& fvGeometry, | ||
100 | const ElementVolumeVariables& elemVolVars, | ||
101 | const SubControlVolume& scv) const | ||
102 | 26400 | { return PrimaryVariables(0.0); } | |
103 | |||
104 | private: | ||
105 | static constexpr Scalar eps_ = 3e-6; | ||
106 | std::string problemName_; | ||
107 | }; | ||
108 | |||
109 | } // end namespace Dumux | ||
110 | |||
111 | #endif | ||
112 |