From cff26152b7189218c2f09d3d854825074bf95ef9 Mon Sep 17 00:00:00 2001 From: Katharina Heck <katharina.heck@iws.uni-stuttgart.de> Date: Thu, 27 Jul 2017 08:39:08 +0200 Subject: [PATCH] [fix][tests] add forgotten setstate method --- .../3p3c/implicit/columnxylolproblem.hh | 16 +++----------- .../3p3c/implicit/kuevetteproblem.hh | 21 +++++++------------ 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh b/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh index e93d497cab..c9df176778 100644 --- a/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh @@ -113,6 +113,7 @@ class ColumnProblem : public ImplicitPorousMediaProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; + typedef typename GET_PROP_TYPE(TypeTag, NumEqVector) NeumannFluxes; typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; @@ -223,7 +224,7 @@ public: * For this method, the \a values parameter stores the mass flux * in normal direction of each phase. Negative values mean influx. */ - PrimaryVariables neumann(const Element& element, + NeumannFluxes neumann(const Element& element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, const SubControlVolumeFace& scvf) const @@ -244,18 +245,6 @@ public: // \} - /*! - * \name Volume terms - */ - // \{ - - /*! - * \brief Evaluate the initial phase state at a given position - * - * \param globalPos The global position - */ - int initialPhasePresenceAtPos(const GlobalPosition &globalPos) - { return threePhases; } /*! * \brief Evaluate the initial value for a control volume. @@ -308,6 +297,7 @@ private: PrimaryVariables initial_(const GlobalPosition &globalPos) const { PrimaryVariables values; + values.setState(threePhases); Scalar y = globalPos[1]; values[temperatureIdx] = 296.15; diff --git a/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh b/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh index ab29c7dc73..1a4458334d 100644 --- a/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh @@ -127,6 +127,7 @@ class KuevetteProblem : public ImplicitPorousMediaProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; + typedef typename GET_PROP_TYPE(TypeTag, NumEqVector) NeumannFluxes; typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; @@ -240,7 +241,7 @@ public: * For this method, the \a values parameter stores the mass flux * in normal direction of each phase. Negative values mean influx. */ - PrimaryVariables neumann(const Element& element, + NeumannFluxes neumann(const Element& element, const FVElementGeometry& fvGeometry, const ElementVolumeVariables& elemVolVars, const SubControlVolumeFace& scvf) const @@ -280,19 +281,6 @@ public: return initial_(globalPos); } - /*! - * \brief Evaluate the initial phase state at a given position - * - * \param globalPos The global position - */ - int initialPhasePresenceAtPos(const GlobalPosition &globalPos) - { - if (isInContaminationZone(globalPos)) - return threePhases; - else - return wgPhaseOnly; - } - /*! * \brief Append all quantities of interest which can be derived * from the solution of the current time step to the VTK @@ -355,6 +343,11 @@ private: PrimaryVariables initial_(const GlobalPosition &globalPos) const { PrimaryVariables values; + if (isInContaminationZone(globalPos)) + values.setState(threePhases); + else + values.setState(wgPhaseOnly); + values[pressureIdx] = 1e5 ; values[switch1Idx] = 0.12; values[switch2Idx] = 1.e-6; -- GitLab