From 2b9516476938020f4eb4540e807670f416feb9ee Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 12 Aug 2009 03:55:50 +0000 Subject: [PATCH] Document computing_timer. git-svn-id: https://svn.dealii.org/trunk@19235 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-32/step-32.cc | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 47332cb441..48759b5a23 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -763,7 +763,32 @@ namespace Assembly // *_solution vectors are // therefore filled immediately after // solving their respective linear system - // in parallel. + // in %parallel. + // + // The only other new data member is + // computing_timer. 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 + // BoussinesqFlowProblem). You + // can take a look at the output generated + // from this variable in the results section + // of this tutorial program. template class BoussinesqFlowProblem { @@ -977,6 +1002,7 @@ BoussinesqFlowProblem::BoussinesqFlowProblem () rebuild_stokes_preconditioner (true), rebuild_temperature_matrices (true), rebuild_temperature_preconditioner (true), + computing_timer (pcout, TimerOutput::summary, TimerOutput::wall_times) {} -- 2.39.5