24#ifndef DUMUX_GEOMECHANICS_FV_PROBLEM_HH
25#define DUMUX_GEOMECHANICS_FV_PROBLEM_HH
36template<
class GlobalPosition>
37struct hasEffFluidDensityAtPos
39 template<
class Problem>
40 auto operator()(
const Problem& a)
41 ->
decltype(a.effectiveFluidDensityAtPos(std::declval<GlobalPosition>()))
47template<
class GlobalPosition>
48struct hasEffPorePressureAtPos
50 template<
class Problem>
51 auto operator()(
const Problem& a)
52 ->
decltype(a.effectivePorePressureAtPos(std::declval<GlobalPosition>()))
66template<
class TypeTag>
73 using FVElementGeometry =
typename GridGeometry::LocalView;
74 using SubControlVolume =
typename GridGeometry::SubControlVolume;
76 using Element =
typename GridView::template Codim<0>::Entity;
77 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
92 template<
int n = numFP, std::enable_if_t<(n > 0),
int> = 0 >
94 const SubControlVolume& scv)
const
96 static_assert(
decltype(
isValid(Detail::hasEffFluidDensityAtPos<GlobalPosition>())(this->
asImp_()))::value,
" \n\n"
97 " Your problem class has to either implement\n\n"
98 " Scalar effectiveFluidDensityAtPos(const GlobalPosition& globalPos) const\n\n"
99 " or overload this function\n\n"
100 " template<class ElementSolution>\n"
101 " Scalar effectiveFluidDensity(const Element& element,\n\
102 const SubControlVolume& scv) const\n\n");
104 return this->
asImp_().effectiveFluidDensityAtPos(scv.center());
120 template<
class ElemVolVars,
class FluxVarsCache,
int n = numFP, std::enable_if_t<(n > 0),
int> = 0 >
122 const FVElementGeometry& fvGeometry,
123 const ElemVolVars& elemVolVars,
124 const FluxVarsCache& fluxVarsCache)
const
126 static_assert(
decltype(
isValid(Detail::hasEffPorePressureAtPos<GlobalPosition>())(this->
asImp_()))::value,
" \n\n"
127 " Your problem class has to either implement\n\n"
128 " Scalar effectivePorePressureAtPos(const GlobalPosition& globalPos) const\n\n"
129 " or overload this function\n\n"
130 " template<class ElementSolution>\n"
131 " Scalar effectivePorePressure(const Element& element,\n"
132 " const FVElementGeometry& fvGeometry,\n"
133 " const ElemVolVars& elemVolVars,\n"
134 " const FluxVarsCache& fluxVarsCache) const\n\n");
136 return this->
asImp_().effectivePorePressureAtPos(element.geometry().center());
A helper function for class member function introspection.
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:584
Base class for all geomechanical problems.
Definition: geomechanics/fvproblem.hh:68
Scalar effectiveFluidDensity(const Element &element, const SubControlVolume &scv) const
Returns the effective fluid density within an scv.
Definition: geomechanics/fvproblem.hh:93
Scalar effectivePorePressure(const Element &element, const FVElementGeometry &fvGeometry, const ElemVolVars &elemVolVars, const FluxVarsCache &fluxVarsCache) const
Returns the effective pore pressure.
Definition: geomechanics/fvproblem.hh:121
Base class for all fully implicit porous media problems.
Definition: porousmediumflow/problem.hh:39
Base class for all porous media problems.