Skip to content
Snippets Groups Projects
Commit af46651a authored by Klaus Mosthaf's avatar Klaus Mosthaf
Browse files

temperature method in stokesproblem thows an error, if called an not...

temperature method in stokesproblem thows an error, if called an not implemented. Changed asImp function according to e.g. implicitproblem.hh

Approved by Bernd and reviewed by Markus.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11940 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 1fc178b1
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,7 @@ public:
* \param globalPos The position in global coordinates where the temperature should be specified.
*/
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
{ return asImp_()->temperature(); }
{ return asImp_().temperature(); }
/*!
* \brief Returns the temperature within the domain.
......@@ -90,7 +90,7 @@ public:
* This method MUST be overwritten by the actual problem.
*/
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.
......@@ -118,12 +118,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_;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment