From 86a2491ef5b278119a3da640a963b67ef02f2524 Mon Sep 17 00:00:00 2001 From: Andreas Lauser <and@poware.org> Date: Fri, 29 Jul 2011 14:06:16 +0000 Subject: [PATCH] box models: make the temperature for "isothermal" models also position dependent git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6338 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/1p/1pproblem.hh | 49 +++++++++++++---- dumux/boxmodels/1p/1pvolumevariables.hh | 2 +- dumux/boxmodels/1p2c/1p2cproblem.hh | 50 ++++++++++++++---- dumux/boxmodels/1p2c/1p2cvolumevariables.hh | 2 +- dumux/boxmodels/2p/2pproblem.hh | 52 ++++++++++++++----- dumux/boxmodels/2p/2pvolumevariables.hh | 2 +- dumux/boxmodels/2p2c/2p2cproblem.hh | 49 +++++++++++++---- dumux/boxmodels/2p2c/2p2cvolumevariables.hh | 2 +- dumux/boxmodels/richards/richardsproblem.hh | 41 ++++++++++++--- .../richards/richardsvolumevariables.hh | 2 +- test/boxmodels/1p/1ptestproblem.hh | 9 +--- test/boxmodels/1p2c/tissue_tumor_problem.hh | 8 +-- test/boxmodels/2p/lensproblem.hh | 14 ++--- test/boxmodels/2p2c/injectionproblem.hh | 8 +-- .../boxmodels/richards/richardslensproblem.hh | 4 +- 15 files changed, 206 insertions(+), 88 deletions(-) diff --git a/dumux/boxmodels/1p/1pproblem.hh b/dumux/boxmodels/1p/1pproblem.hh index 0d80ec9362..7957591d57 100644 --- a/dumux/boxmodels/1p/1pproblem.hh +++ b/dumux/boxmodels/1p/1pproblem.hh @@ -39,7 +39,7 @@ template<class TypeTag> class OnePBoxProblem : public BoxProblem<TypeTag> { typedef BoxProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Implementation; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; @@ -80,12 +80,41 @@ public: // \{ /*! - * \brief Returns the temperature within the domain. + * \brief Returns the temperature \f$\mathrm{[K]}\f$ within a control volume. * - * This method MUST be overwritten by the actual problem. + * This is the discretization specific interface for the box + * method. By default it just calls temperature(pos). + * + * \param element The DUNE Codim<0> enitiy which intersects with + * the finite volume. + * \param fvGeom The finite volume geometry of the element. + * \param scvIdx The local index of the sub control volume inside the element + */ + Scalar boxTemperature(const Element &element, + const FVElementGeometry fvGeom, + int scvIdx) const + { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. + * + * This is not specific to the discretization. By default it just + * calls temperature(). + * + * \param pos The position in global coordinates where the temperature should be specified. + */ + Scalar temperatureAtPos(const GlobalPosition &pos) const + { return asImp_().temperature(); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ for an isothermal problem. + * + * This is not specific to the discretization. By default it just + * throws an exception so it must be overloaded by the problem if + * no energy equation is used. */ Scalar temperature() const - { return asImp_()->temperature(); }; + { DUNE_THROW(Dune::NotImplemented, "temperature() method not implemented by the actual problem"); }; /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -96,7 +125,7 @@ public: const GlobalPosition &boxGravity(const Element &element, const FVElementGeometry &fvGeom, int scvIdx) const - { return gravityAtPos(fvGeom.subContVol[scvIdx].global); } + { return asImp_().gravityAtPos(fvGeom.subContVol[scvIdx].global); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -105,7 +134,7 @@ public: * just calls gravity(). */ const GlobalPosition &gravityAtPos(const GlobalPosition &pos) const - { return gravity(); } + { return asImp_().gravity(); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -133,12 +162,12 @@ public: private: //! Returns the implementation of the problem (i.e. static polymorphism) - Implementation *asImp_() - { return static_cast<Implementation *>(this); } + Implementation &asImp_() + { return *static_cast<Implementation *>(this); } //! \copydoc asImp_() - const Implementation *asImp_() const - { return static_cast<const Implementation *>(this); } + const Implementation &asImp_() const + { return *static_cast<const Implementation *>(this); } SpatialParameters* spatialParameters_; diff --git a/dumux/boxmodels/1p/1pvolumevariables.hh b/dumux/boxmodels/1p/1pvolumevariables.hh index efab1813ba..bab6b873a7 100644 --- a/dumux/boxmodels/1p/1pvolumevariables.hh +++ b/dumux/boxmodels/1p/1pvolumevariables.hh @@ -142,7 +142,7 @@ protected: const FVElementGeometry &elemGeom, int scvIdx, const Problem &problem) - { temperature_ = problem.temperature(element, elemGeom, scvIdx); } + { temperature_ = problem.boxTemperature(element, elemGeom, scvIdx); } Scalar temperature_; Scalar pressure_; diff --git a/dumux/boxmodels/1p2c/1p2cproblem.hh b/dumux/boxmodels/1p2c/1p2cproblem.hh index e03d18d885..4742bd1fe2 100644 --- a/dumux/boxmodels/1p2c/1p2cproblem.hh +++ b/dumux/boxmodels/1p2c/1p2cproblem.hh @@ -41,7 +41,7 @@ template<class TypeTag> class OnePTwoCBoxProblem : public BoxProblem<TypeTag> { typedef BoxProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Implementation; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; @@ -81,12 +81,41 @@ public: // \{ /*! - * \brief Returns the temperature within the domain. + * \brief Returns the temperature \f$\mathrm{[K]}\f$ within a control volume. * - * This method MUST be overwritten by the actual problem. + * This is the discretization specific interface for the box + * method. By default it just calls temperature(pos). + * + * \param element The DUNE Codim<0> enitiy which intersects with + * the finite volume. + * \param fvGeom The finite volume geometry of the element. + * \param scvIdx The local index of the sub control volume inside the element + */ + Scalar boxTemperature(const Element &element, + const FVElementGeometry fvGeom, + int scvIdx) const + { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. + * + * This is not specific to the discretization. By default it just + * calls temperature(). + * + * \param pos The position in global coordinates where the temperature should be specified. + */ + Scalar temperatureAtPos(const GlobalPosition &pos) const + { return asImp_().temperature(); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ for an isothermal problem. + * + * This is not specific to the discretization. By default it just + * throws an exception so it must be overloaded by the problem if + * no energy equation is used. */ Scalar temperature() const - { return asImp_()->temperature(); }; + { DUNE_THROW(Dune::NotImplemented, "temperature() method not implemented by the actual problem"); }; /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -97,7 +126,7 @@ public: const GlobalPosition &boxGravity(const Element &element, const FVElementGeometry &fvGeom, int scvIdx) const - { return gravityAtPos(fvGeom.subContVol[scvIdx].global); } + { return asImp_().gravityAtPos(fvGeom.subContVol[scvIdx].global); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -106,7 +135,7 @@ public: * just calls gravity(). */ const GlobalPosition &gravityAtPos(const GlobalPosition &pos) const - { return gravity(); } + { return asImp_().gravity(); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -136,12 +165,11 @@ public: private: //! Returns the implementation of the problem (i.e. static polymorphism) - Implementation *asImp_() - { return static_cast<Implementation *>(this); } - + Implementation &asImp_() + { return *static_cast<Implementation *>(this); } //! \copydoc asImp_() - const Implementation *asImp_() const - { return static_cast<const Implementation *>(this); } + const Implementation &asImp_() const + { return *static_cast<const Implementation *>(this); } GlobalPosition gravity_; diff --git a/dumux/boxmodels/1p2c/1p2cvolumevariables.hh b/dumux/boxmodels/1p2c/1p2cvolumevariables.hh index ecdc163445..201d608367 100644 --- a/dumux/boxmodels/1p2c/1p2cvolumevariables.hh +++ b/dumux/boxmodels/1p2c/1p2cvolumevariables.hh @@ -220,7 +220,7 @@ protected: int scvIdx, const Problem &problem) { - temperature_ = problem.temperature(element, elemGeom, scvIdx); + temperature_ = problem.boxTemperature(element, elemGeom, scvIdx); } Scalar temperature_; //!< Temperature within the control volume diff --git a/dumux/boxmodels/2p/2pproblem.hh b/dumux/boxmodels/2p/2pproblem.hh index cfbe21da34..35b0e76901 100644 --- a/dumux/boxmodels/2p/2pproblem.hh +++ b/dumux/boxmodels/2p/2pproblem.hh @@ -38,7 +38,7 @@ template<class TypeTag> class TwoPProblem : public BoxProblem<TypeTag> { typedef BoxProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Implementation; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; @@ -99,7 +99,7 @@ public: gravity_[dim-1] = -9.81; } - virtual ~TwoPProblem() + ~TwoPProblem() { if (newSpatialParams_) delete spatialParameters_; @@ -111,12 +111,41 @@ public: // \{ /*! - * \brief Returns the temperature within the domain. + * \brief Returns the temperature \f$\mathrm{[K]}\f$ within a control volume. * - * This method MUST be overwritten by the actual problem. + * This is the discretization specific interface for the box + * method. By default it just calls temperature(pos). + * + * \param element The DUNE Codim<0> enitiy which intersects with + * the finite volume. + * \param fvGeom The finite volume geometry of the element. + * \param scvIdx The local index of the sub control volume inside the element + */ + Scalar boxTemperature(const Element &element, + const FVElementGeometry fvGeom, + int scvIdx) const + { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. + * + * This is not specific to the discretization. By default it just + * calls temperature(). + * + * \param pos The position in global coordinates where the temperature should be specified. + */ + Scalar temperatureAtPos(const GlobalPosition &pos) const + { return asImp_().temperature(); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ for an isothermal problem. + * + * This is not specific to the discretization. By default it just + * throws an exception so it must be overloaded by the problem if + * no energy equation is used. */ Scalar temperature() const - { return asImp_()->temperature(); }; + { DUNE_THROW(Dune::NotImplemented, "temperature() method not implemented by the actual problem"); }; /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -127,7 +156,7 @@ public: const GlobalPosition &boxGravity(const Element &element, const FVElementGeometry &fvGeom, int scvIdx) const - { return gravityAtPos(fvGeom.subContVol[scvIdx].global); } + { return asImp_().gravityAtPos(fvGeom.subContVol[scvIdx].global); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -136,7 +165,7 @@ public: * just calls gravity(). */ const GlobalPosition &gravityAtPos(const GlobalPosition &pos) const - { return gravity(); } + { return asImp_().gravity(); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -166,12 +195,11 @@ public: private: //! Returns the implementation of the problem (i.e. static polymorphism) - Implementation *asImp_() - { return static_cast<Implementation *>(this); } - + Implementation &asImp_() + { return *static_cast<Implementation *>(this); } //! \copydoc asImp_() - const Implementation *asImp_() const - { return static_cast<const Implementation *>(this); } + const Implementation &asImp_() const + { return *static_cast<const Implementation *>(this); } GlobalPosition gravity_; diff --git a/dumux/boxmodels/2p/2pvolumevariables.hh b/dumux/boxmodels/2p/2pvolumevariables.hh index 11e4020ed3..8612933a7e 100644 --- a/dumux/boxmodels/2p/2pvolumevariables.hh +++ b/dumux/boxmodels/2p/2pvolumevariables.hh @@ -223,7 +223,7 @@ protected: int scvIdx, const Problem &problem) { - temperature_ = problem.temperature(element, elemGeom, scvIdx); + temperature_ = problem.boxTemperature(element, elemGeom, scvIdx); } FluidState fluidState_; diff --git a/dumux/boxmodels/2p2c/2p2cproblem.hh b/dumux/boxmodels/2p2c/2p2cproblem.hh index a89375c9bc..39aaf64e48 100644 --- a/dumux/boxmodels/2p2c/2p2cproblem.hh +++ b/dumux/boxmodels/2p2c/2p2cproblem.hh @@ -39,7 +39,7 @@ template<class TypeTag> class TwoPTwoCProblem : public BoxProblem<TypeTag> { typedef BoxProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Implementation; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; @@ -79,12 +79,41 @@ public: // \{ /*! - * \brief Returns the temperature within the domain. + * \brief Returns the temperature \f$\mathrm{[K]}\f$ within a control volume. * - * This method MUST be overwritten by the actual problem. + * This is the discretization specific interface for the box + * method. By default it just calls temperature(pos). + * + * \param element The DUNE Codim<0> enitiy which intersects with + * the finite volume. + * \param fvGeom The finite volume geometry of the element. + * \param scvIdx The local index of the sub control volume inside the element + */ + Scalar boxTemperature(const Element &element, + const FVElementGeometry fvGeom, + int scvIdx) const + { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. + * + * This is not specific to the discretization. By default it just + * calls temperature(). + * + * \param pos The position in global coordinates where the temperature should be specified. + */ + Scalar temperatureAtPos(const GlobalPosition &pos) const + { return asImp_().temperature(); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ for an isothermal problem. + * + * This is not specific to the discretization. By default it just + * throws an exception so it must be overloaded by the problem if + * no energy equation is used. */ Scalar temperature() const - { DUNE_THROW(Dune::NotImplemented, "The Problem must implement a temperature() method for isothermal problems!"); }; + { DUNE_THROW(Dune::NotImplemented, "temperature() method not implemented by the actual problem"); }; /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -95,7 +124,7 @@ public: const GlobalPosition &boxGravity(const Element &element, const FVElementGeometry &fvGeom, int scvIdx) const - { return gravityAtPos(fvGeom.subContVol[scvIdx].global); } + { return asImp_().gravityAtPos(fvGeom.subContVol[scvIdx].global); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -104,7 +133,7 @@ public: * just calls gravity(). */ const GlobalPosition &gravityAtPos(const GlobalPosition &pos) const - { return gravity(); } + { return asImp_().gravity(); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -134,12 +163,12 @@ public: private: //! Returns the implementation of the problem (i.e. static polymorphism) - Implementation *asImp_() - { return static_cast<Implementation *>(this); } + Implementation &asImp_() + { return *static_cast<Implementation *>(this); } //! \copydoc asImp_() - const Implementation *asImp_() const - { return static_cast<const Implementation *>(this); } + const Implementation &asImp_() const + { return *static_cast<const Implementation *>(this); } GlobalPosition gravity_; diff --git a/dumux/boxmodels/2p2c/2p2cvolumevariables.hh b/dumux/boxmodels/2p2c/2p2cvolumevariables.hh index 30734db34e..00ca30e35a 100644 --- a/dumux/boxmodels/2p2c/2p2cvolumevariables.hh +++ b/dumux/boxmodels/2p2c/2p2cvolumevariables.hh @@ -244,7 +244,7 @@ protected: int scvIdx, const Problem &problem) { - temperature_ = problem.temperature(element, elemGeom, scvIdx); + temperature_ = problem.boxTemperature(element, elemGeom, scvIdx); } Scalar temperature_; //!< Temperature within the control volume diff --git a/dumux/boxmodels/richards/richardsproblem.hh b/dumux/boxmodels/richards/richardsproblem.hh index e7b020bed4..193c244561 100644 --- a/dumux/boxmodels/richards/richardsproblem.hh +++ b/dumux/boxmodels/richards/richardsproblem.hh @@ -38,7 +38,7 @@ template<class TypeTag> class RichardsBoxProblem : public BoxProblem<TypeTag> { typedef BoxProblem<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Implementation; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; @@ -87,16 +87,38 @@ public: /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ within a control volume. * - * This method MUST be overwritten by the actual problem. + * This is the discretization specific interface for the box + * method. By default it just calls temperature(pos). * * \param element The DUNE Codim<0> enitiy which intersects with * the finite volume. * \param fvGeom The finite volume geometry of the element. * \param scvIdx The local index of the sub control volume inside the element */ - Scalar temperature(const Element &element, - const FVElementGeometry fvGeom, - int scvIdx) const + Scalar boxTemperature(const Element &element, + const FVElementGeometry fvGeom, + int scvIdx) const + { return asImp_().temperatureAtPos(fvGeom.subContVol[scvIdx].global); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. + * + * This is not specific to the discretization. By default it just + * calls temperature(). + * + * \param pos The position in global coordinates where the temperature should be specified. + */ + Scalar temperatureAtPos(const GlobalPosition &pos) const + { return asImp_().temperature(); } + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ for an isothermal problem. + * + * This is not specific to the discretization. By default it just + * throws an exception so it must be overloaded by the problem if + * no energy equation is used. + */ + Scalar temperature() const { DUNE_THROW(Dune::NotImplemented, "temperature() method not implemented by the actual problem"); }; /*! @@ -124,7 +146,7 @@ public: const GlobalPosition &boxGravity(const Element &element, const FVElementGeometry &fvGeom, int scvIdx) const - { return gravityAtPos(fvGeom.subContVol[scvIdx].global); } + { return asImp_().gravityAtPos(fvGeom.subContVol[scvIdx].global); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -133,7 +155,7 @@ public: * just calls gravity(). */ const GlobalPosition &gravityAtPos(const GlobalPosition &pos) const - { return gravity(); } + { return asImp_().gravity(); } /*! * \brief Returns the acceleration due to gravity \f$\mathrm{[m/s^2]}\f$. @@ -162,6 +184,11 @@ public: // \} private: + Implementation &asImp_() + { return *static_cast<Implementation*>(this); } + const Implementation &asImp_() const + { return *static_cast<const Implementation*>(this); } + // the gravity vector GlobalPosition gravity_; diff --git a/dumux/boxmodels/richards/richardsvolumevariables.hh b/dumux/boxmodels/richards/richardsvolumevariables.hh index 18fa84c657..8df6ac0e46 100644 --- a/dumux/boxmodels/richards/richardsvolumevariables.hh +++ b/dumux/boxmodels/richards/richardsvolumevariables.hh @@ -211,7 +211,7 @@ protected: int scvIdx, const Problem &problem) { - temperature_ = problem.temperature(element, elemGeom, scvIdx); + temperature_ = problem.boxTemperature(element, elemGeom, scvIdx); } FluidState fluidState_; diff --git a/test/boxmodels/1p/1ptestproblem.hh b/test/boxmodels/1p/1ptestproblem.hh index db1100ae70..93002cc041 100644 --- a/test/boxmodels/1p/1ptestproblem.hh +++ b/test/boxmodels/1p/1ptestproblem.hh @@ -157,13 +157,8 @@ public: * * This problem assumes a temperature of 10 degrees Celsius. */ - Scalar temperature(const Element &element, - const FVElementGeometry &fvElemGeom, - int scvIdx) const - { - return 273.15 + 10; // 10°C - }; - + Scalar temperature() const + { return 273.15 + 10; } // 10°C // \} /*! diff --git a/test/boxmodels/1p2c/tissue_tumor_problem.hh b/test/boxmodels/1p2c/tissue_tumor_problem.hh index 5b0feb249c..692b6b3fac 100644 --- a/test/boxmodels/1p2c/tissue_tumor_problem.hh +++ b/test/boxmodels/1p2c/tissue_tumor_problem.hh @@ -189,12 +189,8 @@ public: * * This problem assumes a temperature of 36 degrees Celsius. */ - Scalar temperature(const Element &element, - const FVElementGeometry &fvElemGeom, - int scvIdx) const - { - return 273.15 + 36; // in [K] - }; + Scalar temperature() const + { return 273.15 + 36; }; // in [K] // \} diff --git a/test/boxmodels/2p/lensproblem.hh b/test/boxmodels/2p/lensproblem.hh index a3f6dca4c6..0f890c1e85 100644 --- a/test/boxmodels/2p/lensproblem.hh +++ b/test/boxmodels/2p/lensproblem.hh @@ -256,18 +256,10 @@ public: /*! * \brief Returns the temperature within the domain. * - * \param element The element - * \param fvElemGeom The finite-volume geometry in the box scheme - * \param scvIdx The local vertex index (SCV index) - * - * This problem assumes a temperature of 10 degrees Celsius. + * This problem assumes a uniform temperature of 10 degrees Celsius. */ - Scalar temperature(const Element &element, - const FVElementGeometry &fvElemGeom, - int scvIdx) const - { - return temperature_; - }; + Scalar temperature() const + { return temperature_; }; // \} diff --git a/test/boxmodels/2p2c/injectionproblem.hh b/test/boxmodels/2p2c/injectionproblem.hh index 97ee4f1671..f775b7bde8 100644 --- a/test/boxmodels/2p2c/injectionproblem.hh +++ b/test/boxmodels/2p2c/injectionproblem.hh @@ -200,12 +200,8 @@ public: * * This problem assumes a temperature of 10 degrees Celsius. */ - Scalar temperature(const Element &element, - const FVElementGeometry &fvElemGeom, - int scvIdx) const - { - return temperature_; - }; + Scalar temperature() const + { return temperature_; }; // \} diff --git a/test/boxmodels/richards/richardslensproblem.hh b/test/boxmodels/richards/richardslensproblem.hh index dad113bda3..55418a0bfd 100644 --- a/test/boxmodels/richards/richardslensproblem.hh +++ b/test/boxmodels/richards/richardslensproblem.hh @@ -188,9 +188,7 @@ public: * \param scvIdx The sub control volume index inside the finite * volume geometry */ - Scalar temperature(const Element &element, - const FVElementGeometry &fvElemGeom, - int scvIdx) const + Scalar temperature() const { return 273.15 + 10; }; // -> 10°C /*! -- GitLab