diff --git a/dumux/geomechanics/poroelastic/couplingmanager.hh b/dumux/geomechanics/poroelastic/couplingmanager.hh index 503e317fbc4a30683e3b4fe8008ab1d5da1d9777..6db3c2ddcf243c2d21932168b757b3e7394ba705 100644 --- a/dumux/geomechanics/poroelastic/couplingmanager.hh +++ b/dumux/geomechanics/poroelastic/couplingmanager.hh @@ -66,6 +66,7 @@ class PoroMechanicsCouplingManager : public virtual CouplingManager< MDTraits > template<std::size_t id> using PrimaryVariables = typename GridVariables<id>::PrimaryVariables; template<std::size_t id> using GridVolumeVariables = typename GridVariables<id>::GridVolumeVariables; template<std::size_t id> using ElementVolumeVariables = typename GridVolumeVariables<id>::LocalView; + template<std::size_t id> using VolumeVariables = typename GridVolumeVariables<id>::VolumeVariables; template<std::size_t id> using FVGridGeometry = typename GridVariables<id>::GridGeometry; template<std::size_t id> using FVElementGeometry = typename FVGridGeometry<id>::LocalView; template<std::size_t id> using GridView = typename FVGridGeometry<id>::GridView; @@ -353,6 +354,15 @@ public: const PoroMechanicsCouplingContext& poroMechanicsCouplingContext() const { return poroMechCouplingContext_; } + + //! Return the porous medium flow variables an element/scv of the poromech domain couples to + const VolumeVariables<PMFlowId>& getPMFlowVolVars(const Element<PoroMechId>& element) const + { + //! If we do not yet have the queried object, build it first + const auto eIdx = this->problem(poroMechId).fvGridGeometry().elementMapper().index(element); + return (*poroMechCouplingContext_.pmFlowElemVolVars)[eIdx]; + } + /*! * \brief the solution vector of the coupled problem * \note in case of numeric differentiation the solution vector always carries the deflected solution