From 51121c0eabc0980961685f968fcb211076ed53c4 Mon Sep 17 00:00:00 2001 From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de> Date: Mon, 22 Feb 2016 15:46:48 +0100 Subject: [PATCH] [2p2c] Add convenience function for phase presence --- .../porousmediumflow/2p2c/implicit/volumevariables.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dumux/porousmediumflow/2p2c/implicit/volumevariables.hh b/dumux/porousmediumflow/2p2c/implicit/volumevariables.hh index 101d5b0bd9..b119ed44de 100644 --- a/dumux/porousmediumflow/2p2c/implicit/volumevariables.hh +++ b/dumux/porousmediumflow/2p2c/implicit/volumevariables.hh @@ -122,6 +122,9 @@ public: scvIdx, isOldSol); + int dofIdxGlobal = problem.model().dofMapper().subIndex(element, scvIdx, dofCodim); + phasePresence_ = problem.model().phasePresence(dofIdxGlobal, isOldSol); + completeFluidState(priVars, problem, element, fvGeometry, scvIdx, fluidState_, isOldSol); ///////////// @@ -455,6 +458,12 @@ public: const FluidState &fluidState() const { return fluidState_; } + /*! + * \brief Returns the phase presence within the control volume. + */ + const int phasePresence() const + { return phasePresence_; } + /*! * \brief Returns the saturation of a given phase within * the control volume in \f$[-]\f$. @@ -605,6 +614,7 @@ protected: Scalar relativePermeability_[numPhases]; //!< Relative permeability within the control volume Scalar diffCoeff_[numPhases]; //!< Binary diffusion coefficients for the phases FluidState fluidState_; + int phasePresence_; private: Implementation &asImp_() -- GitLab