]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Change the do_loop function to use the STL function objects. This has
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 2 Mar 1999 16:28:00 +0000 (16:28 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 2 Mar 1999 16:28:00 +0000 (16:28 +0000)
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

index 0bfadf96f6b78fdbcd036f8e16cd8f3a2935c046..15e39a2f3a45d734c36e89a43299936cf9a92885 100644 (file)
@@ -6,6 +6,8 @@
 #include <grid/tria_accessor.h>
 #include <grid/tria_iterator.h>
 
+#include <function.h>
+
 
 
 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);
 };
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.