From: wolf Date: Mon, 22 Feb 1999 14:51:38 +0000 (+0000) Subject: Make the function time usable again: remove the #time# variable from the Function... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f60208516801d466c8683a83e35c4af301c28d5;p=dealii-svn.git Make the function time usable again: remove the #time# variable from the Function class. Clean FunctionTime a bit. git-svn-id: https://svn.dealii.org/trunk@874 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/function.h b/deal.II/base/include/base/function.h index e3a6acde4b..48ddc05c26 100644 --- a/deal.II/base/include/base/function.h +++ b/deal.II/base/include/base/function.h @@ -40,8 +40,7 @@ * @author Wolfgang Bangerth, 1998, 1999 */ template -class Function : - public FunctionTime +class Function : public FunctionTime { public: /** @@ -101,12 +100,6 @@ class Function : int, int, << "The vector has size " << arg1 << " but should have " << arg2 << " elements."); - - protected: - /** - * Store the present time. - */ - double time; }; diff --git a/deal.II/base/include/base/function_time.h b/deal.II/base/include/base/function_time.h index d29dc463a2..21cb151f14 100644 --- a/deal.II/base/include/base/function_time.h +++ b/deal.II/base/include/base/function_time.h @@ -59,10 +59,10 @@ class FunctionTime { */ FunctionTime (const double initial_time = 0.0); - /** - * Virtual destructor. - */ - virtual ~FunctionTime(); + /** + * Virtual destructor. + */ + virtual ~FunctionTime(); /** * Return the value of the time variable/ @@ -81,13 +81,15 @@ class FunctionTime { */ virtual void advance_time (const double delta_t); -private: + private: /** * Store the present time. */ double time; }; + + inline double FunctionTime::get_time () const {