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