]> https://gitweb.dealii.org/ - dealii.git/commitdiff
step-55: Be uniform where timer sections are placed. 17077/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 25 May 2024 03:41:02 +0000 (21:41 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 25 May 2024 03:41:02 +0000 (21:41 -0600)
examples/step-55/step-55.cc

index 745faeeeca4f15421bda6bffef3ca0b43ca811a4..44820c6cab9373dc95e98c1e7e86787b4690c8de 100644 (file)
@@ -300,7 +300,7 @@ namespace Step55
     void assemble_system();
     void solve();
     void refine_grid();
-    void output_results(const unsigned int cycle) const;
+    void output_results(const unsigned int cycle);
 
     const unsigned int velocity_degree;
     const double       viscosity;
@@ -675,8 +675,10 @@ namespace Step55
 
 
   template <int dim>
-  void StokesProblem<dim>::output_results(const unsigned int cycle) const
+  void StokesProblem<dim>::output_results(const unsigned int cycle)
   {
+    TimerOutput::Scope t(computing_timer, "output");
+
     {
       const ComponentSelectFunction<dim> pressure_mask(dim, dim + 1);
       const ComponentSelectFunction<dim> velocity_mask(std::make_pair(0, dim),
@@ -786,10 +788,7 @@ namespace Step55
         solve();
 
         if (Utilities::MPI::n_mpi_processes(mpi_communicator) <= 32)
-          {
-            TimerOutput::Scope t(computing_timer, "output");
-            output_results(cycle);
-          }
+          output_results(cycle);
 
         computing_timer.print_summary();
         computing_timer.reset();

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.