3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
geomechanics/fvproblem.hh
Go to the documentation of this file.
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_GEOMECHANICS_FV_PROBLEM_HH
25#define DUMUX_GEOMECHANICS_FV_PROBLEM_HH
26
29
30// for helpers in detail namespace (TODO: Remove after deprecation period after release 3.5)
32
33namespace Dumux {
34
41template<class TypeTag>
43{
45
48 using FVElementGeometry = typename GridGeometry::LocalView;
49 using SubControlVolume = typename GridGeometry::SubControlVolume;
51 using Element = typename GridView::template Codim<0>::Entity;
52 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
53
55
56public:
58 using ParentType::ParentType;
59
70 template< int n = numFP, std::enable_if_t<(n > 0), int> = 0 >
71 [[deprecated("effectiveFluidDensity() is now defined in the spatial params. This interface will be removed after release 3.5.")]]
72 Scalar effectiveFluidDensity(const Element& element,
73 const SubControlVolume& scv,
74 int deprecationHelper = 0) const
75 {
76 static_assert(decltype(isValid(Detail::hasEffFluidDensityAtPos<GlobalPosition>())(this->asImp_()))::value," \n\n"
77 " Your problem class has to either implement\n\n"
78 " Scalar effectiveFluidDensityAtPos(const GlobalPosition& globalPos) const\n\n"
79 " or overload this function\n\n"
80 " template<class ElementSolution>\n"
81 " Scalar effectiveFluidDensity(const Element& element,\n\
82 const SubControlVolume& scv) const\n\n");
83
84 return this->asImp_().effectiveFluidDensityAtPos(scv.center());
85 }
86
103 template< class ElemVolVars, class FluxVarsCache, int n = numFP, std::enable_if_t<(n > 0), int> = 0 >
104 [[deprecated("effectivePorePressure() is now defined in the spatial params. This interface will be removed after release 3.5.")]]
105 Scalar effectivePorePressure(const Element& element,
106 const FVElementGeometry& fvGeometry,
107 const ElemVolVars& elemVolVars,
108 const FluxVarsCache& fluxVarsCache,
109 int deprecationHelper = 0) const
110 {
111 static_assert(decltype(isValid(Detail::hasEffPorePressureAtPos<GlobalPosition>())(this->asImp_()))::value," \n\n"
112 " Your problem class has to either implement\n\n"
113 " Scalar effectivePorePressureAtPos(const GlobalPosition& globalPos) const\n\n"
114 " or overload this function\n\n"
115 " template<class ElementSolution>\n"
116 " Scalar effectivePorePressure(const Element& element,\n"
117 " const FVElementGeometry& fvGeometry,\n"
118 " const ElemVolVars& elemVolVars,\n"
119 " const FluxVarsCache& fluxVarsCache) const\n\n");
120
121 return this->asImp_().effectivePorePressureAtPos(element.geometry().center());
122 }
123};
124
125} // end namespace Dumux
126
127#endif
A helper function for class member function introspection.
Definition: adapt.hh:29
constexpr auto isValid(const Expression &t)
A function that creates a test functor to do class member introspection at compile time.
Definition: isvalid.hh:93
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:55
Implementation & asImp_()
Returns the implementation of the problem (i.e. static polymorphism)
Definition: common/fvproblem.hh:591
Base class for all geomechanical problems.
Definition: geomechanics/fvproblem.hh:43
Scalar effectivePorePressure(const Element &element, const FVElementGeometry &fvGeometry, const ElemVolVars &elemVolVars, const FluxVarsCache &fluxVarsCache, int deprecationHelper=0) const
Returns the effective pore pressure.
Definition: geomechanics/fvproblem.hh:105
Scalar effectiveFluidDensity(const Element &element, const SubControlVolume &scv, int deprecationHelper=0) const
Returns the effective fluid density within an scv.
Definition: geomechanics/fvproblem.hh:72
Base class for all fully implicit porous media problems.
Definition: porousmediumflow/problem.hh:40
The base class for spatial parameters of poro-elastic geomechanical problems.
Base class for all porous media problems.