From: Wolfgang Bangerth Date: Thu, 24 Sep 2020 00:10:42 +0000 (-0600) Subject: Avoid use of deallog in step-29. X-Git-Tag: v9.3.0-rc1~1071^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6f7e70730e514bade9825776011bc46381ab71f;p=dealii.git Avoid use of deallog in step-29. In the process, make the output more readable since we can avoid the obscuring prefix that doesn't actually provide any kind of information. --- diff --git a/examples/step-29/doc/results.dox b/examples/step-29/doc/results.dox index 3f54ebf19e..d93a0e4537 100644 --- a/examples/step-29/doc/results.dox +++ b/examples/step-29/doc/results.dox @@ -46,13 +46,13 @@ Here's the console output of the program in debug mode: > make run [ 66%] Built target step-29 [100%] Run step-29 with Debug configuration -DEAL::Generating grid... done (0.832682s) -DEAL:: Number of active cells: 25600 -DEAL::Setting up system... done (0.614761s) -DEAL:: Number of degrees of freedom: 51842 -DEAL::Assembling system matrix... done (2.82536s) -DEAL::Solving linear system... done (2.27971s) -DEAL::Generating output... done (1.84418s) +Generating grid... done (0.820449s) + Number of active cells: 25600 +Setting up system... done (1.18392s) + Number of degrees of freedom: 51842 +Assembling system matrix... done (2.33291s) +Solving linear system... done (1.34837s) +Generating output... done (2.05782s) [100%] Built target run @endcode diff --git a/examples/step-29/step-29.cc b/examples/step-29/step-29.cc index 102fd53144..990f18f63e 100644 --- a/examples/step-29/step-29.cc +++ b/examples/step-29/step-29.cc @@ -414,7 +414,7 @@ namespace Step29 { // First we generate some logging output and start a timer so we can // compute execution time when this function is done: - deallog << "Generating grid... "; + std::cout << "Generating grid... "; Timer timer; // Then we query the values for the focal distance of the transducer lens @@ -475,10 +475,10 @@ namespace Step29 // query the number of CPU seconds elapsed since the beginning of the // function: timer.stop(); - deallog << "done (" << timer.cpu_time() << "s)" << std::endl; + std::cout << "done (" << timer.cpu_time() << "s)" << std::endl; - deallog << " Number of active cells: " << triangulation.n_active_cells() - << std::endl; + std::cout << " Number of active cells: " << triangulation.n_active_cells() + << std::endl; } @@ -491,7 +491,7 @@ namespace Step29 template void UltrasoundProblem::setup_system() { - deallog << "Setting up system... "; + std::cout << "Setting up system... "; Timer timer; dof_handler.distribute_dofs(fe); @@ -505,10 +505,10 @@ namespace Step29 solution.reinit(dof_handler.n_dofs()); timer.stop(); - deallog << "done (" << timer.cpu_time() << "s)" << std::endl; + std::cout << "done (" << timer.cpu_time() << "s)" << std::endl; - deallog << " Number of degrees of freedom: " << dof_handler.n_dofs() - << std::endl; + std::cout << " Number of degrees of freedom: " << dof_handler.n_dofs() + << std::endl; } @@ -519,7 +519,7 @@ namespace Step29 template void UltrasoundProblem::assemble_system() { - deallog << "Assembling system matrix... "; + std::cout << "Assembling system matrix... "; Timer timer; // First we query wavespeed and frequency from the ParameterHandler object @@ -734,7 +734,7 @@ namespace Step29 system_rhs); timer.stop(); - deallog << "done (" << timer.cpu_time() << "s)" << std::endl; + std::cout << "done (" << timer.cpu_time() << "s)" << std::endl; } @@ -756,7 +756,7 @@ namespace Step29 template void UltrasoundProblem::solve() { - deallog << "Solving linear system... "; + std::cout << "Solving linear system... "; Timer timer; // The code to solve the linear system is short: First, we allocate an @@ -774,7 +774,7 @@ namespace Step29 A_direct.vmult(solution, system_rhs); timer.stop(); - deallog << "done (" << timer.cpu_time() << "s)" << std::endl; + std::cout << "done (" << timer.cpu_time() << "s)" << std::endl; } @@ -790,7 +790,7 @@ namespace Step29 template void UltrasoundProblem::output_results() const { - deallog << "Generating output... "; + std::cout << "Generating output... "; Timer timer; // Define objects of our ComputeIntensity class and a DataOut @@ -841,7 +841,7 @@ namespace Step29 data_out.write(output); timer.stop(); - deallog << "done (" << timer.cpu_time() << "s)" << std::endl; + std::cout << "done (" << timer.cpu_time() << "s)" << std::endl; } @@ -877,8 +877,6 @@ int main() using namespace dealii; using namespace Step29; - deallog.depth_console(5); - ParameterHandler prm; ParameterReader param(prm); param.read_parameters("step-29.prm");