]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Unclutter step-40's run() function. 16863/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 6 Apr 2024 16:22:37 +0000 (10:22 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 6 Apr 2024 16:22:37 +0000 (10:22 -0600)
Move detailed output into the function that actually creates this information.
This ensures that the run() function itself remains rather clean and easy to
follow.

examples/step-40/step-40.cc

index 2b353a75c1624584362daabd8e326f70ab1cf104..818769774dd10fca225bd6b9efbd1577a325a5fc 100644 (file)
@@ -243,6 +243,12 @@ namespace Step40
 
     dof_handler.distribute_dofs(fe);
 
+    pcout << "   Number of active cells:       "
+          << triangulation.n_global_active_cells() << std::endl
+          << "   Number of degrees of freedom: " << dof_handler.n_dofs()
+          << std::endl;
+
+
     // The next two lines extract some information we will need later on,
     // namely two index sets that provide information about which degrees of
     // freedom are owned by the current processor (this information will be
@@ -644,12 +650,6 @@ namespace Step40
           refine_grid();
 
         setup_system();
-
-        pcout << "   Number of active cells:       "
-              << triangulation.n_global_active_cells() << std::endl
-              << "   Number of degrees of freedom: " << dof_handler.n_dofs()
-              << std::endl;
-
         assemble_system();
         solve();
 

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.