]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Document computing_timer.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 12 Aug 2009 03:55:50 +0000 (03:55 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 12 Aug 2009 03:55:50 +0000 (03:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@19235 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-32/step-32.cc

index 47332cb44197cc6cb9d7a6dbe2a505242460c4ce..48759b5a234f75b3231fc8d3f62497e0b3722171 100644 (file)
@@ -763,7 +763,32 @@ namespace Assembly
                                 // <code>*_solution</code> vectors are
                                 // therefore filled immediately after
                                 // solving their respective linear system
-                                // in parallel.
+                                // in %parallel.
+                                //
+                                // The only other new data member is
+                                // <code>computing_timer</code>. Its class
+                                // type, TimerOutput, can be used to
+                                // conveniently account for compute time
+                                // spent in certain "sections" of the code
+                                // that are repeatedly entered. For example,
+                                // we will enter (and leave) sections for
+                                // Stokes matrix assembly and would like to
+                                // accumulate the run time spent in this
+                                // section over all time steps. At the end of
+                                // the program, the destructor of the
+                                // TimerOutput class will automatically
+                                // produce a nice summary of the times spent
+                                // in all the sections. For this output, one
+                                // can choose whether wall clock or CPU times
+                                // are to be printed, as well as whether we
+                                // want a percentage breakdown of where the
+                                // time was spent (this choice is made in the
+                                // constructor of TimerOutput, which is
+                                // called in the constructor of
+                                // <code>BoussinesqFlowProblem</code>). You
+                                // can take a look at the output generated
+                                // from this variable in the results section
+                                // of this tutorial program.
 template <int dim>
 class BoussinesqFlowProblem
 {
@@ -977,6 +1002,7 @@ BoussinesqFlowProblem<dim>::BoussinesqFlowProblem ()
                rebuild_stokes_preconditioner (true),
                rebuild_temperature_matrices (true),
                rebuild_temperature_preconditioner (true),
+               
                computing_timer (pcout, TimerOutput::summary,
                                 TimerOutput::wall_times)
 {}

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.