From 1509a1a6b8dc797ceab3589928daf9b274673293 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 19 Apr 1999 09:16:15 +0000 Subject: [PATCH] Make function names more intuitive. Add post-sweep clean-up function. git-svn-id: https://svn.dealii.org/trunk@1175 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/include/numerics/time_dependent.h | 20 ++++++++++++++++++- .../deal.II/source/numerics/time_dependent.cc | 19 ++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/deal.II/deal.II/include/numerics/time_dependent.h b/deal.II/deal.II/include/numerics/time_dependent.h index fe4bd3f26d..f2d3c7aa07 100644 --- a/deal.II/deal.II/include/numerics/time_dependent.h +++ b/deal.II/deal.II/include/numerics/time_dependent.h @@ -423,9 +423,20 @@ class TimeDependent * function since this is some kind of * "constructor-like" function, which * should be called bottom-up. + * + * The default implementation of this + * function calls #start_sweep# on all + * time step objects. */ virtual void start_sweep (const unsigned int sweep_no); + /** + * Analogon to the above function, + * calling #end_sweep# of each time + * step object. + */ + virtual void end_sweep (); + /** * Exception. */ @@ -715,8 +726,15 @@ class TimeStepBase : public Subscriptor * The default implementation of this * function does nothing. */ - virtual void init_for_sweep (); + virtual void start_sweep (); + /** + * This is the analogon to the above + * function, but it is called at the + * end of a sweep. + */ + virtual void end_sweep (); + /** * Before the primal problem is * solved on each time level, this diff --git a/deal.II/deal.II/source/numerics/time_dependent.cc b/deal.II/deal.II/source/numerics/time_dependent.cc index 8bb2ced472..5fd33eb2cd 100644 --- a/deal.II/deal.II/source/numerics/time_dependent.cc +++ b/deal.II/deal.II/source/numerics/time_dependent.cc @@ -185,11 +185,20 @@ void TimeDependent::start_sweep (const unsigned int s) }; for (unsigned int step=0; stepinit_for_sweep (); + timesteps[step]->start_sweep (); }; +void TimeDependent::end_sweep () +{ + for (unsigned int step=0; stepend_sweep (); +}; + + + + /* --------------------------------------------------------------------- */ @@ -222,7 +231,13 @@ TimeStepBase::sleep (const unsigned) void -TimeStepBase::init_for_sweep () +TimeStepBase::start_sweep () +{}; + + + +void +TimeStepBase::end_sweep () {}; -- 2.39.5