24#ifndef DUMUX_GEOMECHANICS_ELASTIC_FV_SPATIAL_PARAMS_HH
25#define DUMUX_GEOMECHANICS_ELASTIC_FV_SPATIAL_PARAMS_HH
29#include <dune/common/exceptions.hh>
33#include <dumux/geomechanics/spatialparamstraits_.hh>
41template<
class Gr
idGeometry,
class Scalar,
class Implementation>
45 using FVElementGeometry =
typename GridGeometry::LocalView;
46 using SubControlVolume =
typename GridGeometry::SubControlVolume;
47 using GridView =
typename GridGeometry::GridView;
48 using Element =
typename GridView::template Codim<0>::Entity;
49 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
67 template<
class Sol
idSystem,
class ElementSolution>
69 const SubControlVolume& scv,
70 const ElementSolution& elemSol,
73 static_assert(SolidSystem::isInert(),
"Elastic model can only be used with inert solid systems");
76 if constexpr (SolidSystem::numInertComponents == 1)
80 return this->
asImp_().template inertVolumeFractionAtPos<SolidSystem>(scv.center(), compIdx);
91 template<
class Sol
idSystem>
93 { DUNE_THROW(Dune::InvalidStateException,
"The spatial parameters do not provide inertVolumeFractionAtPos() method."); }
108 template<
class ElemVolVars,
class FluxVarsCache>
110 const FVElementGeometry& fvGeometry,
111 const ElemVolVars& elemVolVars,
112 const FluxVarsCache& fluxVarsCache)
const
114 static_assert(
decltype(
isValid(Detail::hasLameParamsAtPos<GlobalPosition>())(this->
asImp_()))::value,
" \n\n"
115 " Your spatial params class has to either implement\n\n"
116 " const LameParams& lameParamsAtPos(const GlobalPosition& globalPos) const\n\n"
117 " or overload this function\n\n"
118 " template<class ElementSolution>\n"
119 " const LameParams& lameParams(const Element& element,\n"
120 " const FVElementGeometry& fvGeometry,\n"
121 " const ElemVolVars& elemVolVars,\n"
122 " const FluxVarsCache& fluxVarsCache) const\n\n");
124 return this->
asImp_().lameParamsAtPos(fluxVarsCache.ipGlobal());
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
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
The base class for spatial parameters used with finite-volume schemes.
Definition: common/fvspatialparams.hh:46
Implementation & asImp_()
Returns the implementation of the spatial parameters (static polymorphism)
Definition: common/fvspatialparams.hh:147
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvspatialparams.hh:142
The base class for spatial parameters of linear elastic geomechanical problems.
Definition: geomechanics/elastic/fvspatialparams.hh:43
Scalar inertVolumeFractionAtPos(const GlobalPosition &globalPos, int compIdx) const
Function for defining the solid volume fraction. That is possibly solution dependent.
Definition: geomechanics/elastic/fvspatialparams.hh:92
decltype(auto) lameParams(const Element &element, const FVElementGeometry &fvGeometry, const ElemVolVars &elemVolVars, const FluxVarsCache &fluxVarsCache) const
Define the Lame parameters.
Definition: geomechanics/elastic/fvspatialparams.hh:109
FVElasticSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
The constructor.
Definition: geomechanics/elastic/fvspatialparams.hh:53
Scalar inertVolumeFraction(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, int compIdx) const
Function for defining the solid volume fraction. That is possibly solution dependent.
Definition: geomechanics/elastic/fvspatialparams.hh:68
Basic spatial parameters to be used with finite-volume schemes.