From: wolf Date: Wed, 18 Aug 1999 08:04:57 +0000 (+0000) Subject: Add a function to retrieve the timestep's number. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80affde73de3d669d242eba0750bf67fabc6a9ff;p=dealii-svn.git Add a function to retrieve the timestep's number. git-svn-id: https://svn.dealii.org/trunk@1707 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/time_dependent.h b/deal.II/deal.II/include/numerics/time_dependent.h index ca52e70303..5903a36af4 100644 --- a/deal.II/deal.II/include/numerics/time_dependent.h +++ b/deal.II/deal.II/include/numerics/time_dependent.h @@ -859,6 +859,14 @@ class TimeStepBase : public Subscriptor * step. */ double get_time () const; + + /** + * Return the number of this time + * step. Note that this number may vary + * between different sweeps, if timesteps + * are added or deleted. + */ + unsigned int get_timestep_no () const; /** * Compute the time difference to the diff --git a/deal.II/deal.II/source/numerics/time_dependent.cc b/deal.II/deal.II/source/numerics/time_dependent.cc index 5fd33eb2cd..07145e4f84 100644 --- a/deal.II/deal.II/source/numerics/time_dependent.cc +++ b/deal.II/deal.II/source/numerics/time_dependent.cc @@ -291,6 +291,14 @@ TimeStepBase::get_time () const +unsigned int +TimeStepBase::get_timestep_no () const +{ + return timestep_no; +}; + + + double TimeStepBase::get_backward_timestep () const {