From 59d2679892d718ee7369dc5bda6284d3815ce702 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 2 Mar 1999 16:28:00 +0000 Subject: [PATCH] Change the do_loop function to use the STL function objects. This has the advantage that we can now pass function objects using bind2nd etc to pass parameters to the functions we want to have called. git-svn-id: https://svn.dealii.org/trunk@938 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/numerics/time_dependent.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/deal.II/deal.II/source/numerics/time_dependent.cc b/deal.II/deal.II/source/numerics/time_dependent.cc index 0bfadf96f6..15e39a2f3a 100644 --- a/deal.II/deal.II/source/numerics/time_dependent.cc +++ b/deal.II/deal.II/source/numerics/time_dependent.cc @@ -6,6 +6,8 @@ #include #include +#include + TimeDependent::TimeSteppingData::TimeSteppingData (const unsigned int look_ahead, @@ -128,12 +130,11 @@ void TimeDependent::delete_timestep (const unsigned int position) - void TimeDependent::solve_primal_problem () { - do_loop (&TimeStepBase::init_for_primal_problem, - &TimeStepBase::solve_primal_problem, + do_loop (mem_fun(&TimeStepBase::init_for_primal_problem), + mem_fun(&TimeStepBase::solve_primal_problem), timestepping_data_primal); }; @@ -142,8 +143,8 @@ TimeDependent::solve_primal_problem () void TimeDependent::solve_dual_problem () { - do_loop (&TimeStepBase::init_for_dual_problem, - &TimeStepBase::solve_dual_problem, + do_loop (mem_fun(&TimeStepBase::init_for_dual_problem), + mem_fun(&TimeStepBase::solve_dual_problem), timestepping_data_dual); }; @@ -152,8 +153,8 @@ TimeDependent::solve_dual_problem () void TimeDependent::postprocess () { - do_loop (&TimeStepBase::init_for_postprocessing, - &TimeStepBase::postprocess_timestep, + do_loop (mem_fun(&TimeStepBase::init_for_postprocessing), + mem_fun(&TimeStepBase::postprocess_timestep), timestepping_data_postprocess); }; -- 2.39.5