From 80f7902620f937f5a1ce6e474cd3516d7e1a013b Mon Sep 17 00:00:00 2001 From: heister Date: Wed, 20 Mar 2013 15:22:34 +0000 Subject: [PATCH] more TimerOutput changes git-svn-id: https://svn.dealii.org/trunk@28957 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 4 +++- deal.II/include/deal.II/base/timer.h | 4 ++-- deal.II/source/base/timer.cc | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index d5d9d8d10d..120da077a6 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -69,7 +69,9 @@ this function.
    -
  1. Added TimerOutput::reset to remove the collected information so far. +
  2. Added TimerOutput::reset to remove the collected information so far and +added a new frequency TimerOutput::never to only output information if +triggered by print_summary().
    (Timo Heister, 2013/03/20) diff --git a/deal.II/include/deal.II/base/timer.h b/deal.II/include/deal.II/base/timer.h index 5d1cdfc1b3..9450b20a6d 100644 --- a/deal.II/include/deal.II/base/timer.h +++ b/deal.II/include/deal.II/base/timer.h @@ -323,9 +323,9 @@ public: /** * Sets whether to generate output every * time we exit a section, just in the - * end, or both. + * end, both, or never. */ - enum OutputFrequency {every_call, summary, every_call_and_summary} + enum OutputFrequency {every_call, summary, every_call_and_summary, never} output_frequency; /** diff --git a/deal.II/source/base/timer.cc b/deal.II/source/base/timer.cc index c6d905beae..fa306f48a8 100644 --- a/deal.II/source/base/timer.cc +++ b/deal.II/source/base/timer.cc @@ -328,7 +328,8 @@ TimerOutput::~TimerOutput() while (active_sections.size() > 0) leave_subsection(); - if (output_frequency != every_call && output_is_enabled == true) + if ( (output_frequency == summary || output_frequency == every_call_and_summary) + && output_is_enabled == true) print_summary(); } -- 2.39.5