]> https://gitweb.dealii.org/ - dealii.git/commitdiff
step-78: Make output a lot quieter.
authorDavid Wells <drwells@email.unc.edu>
Fri, 21 May 2021 16:21:49 +0000 (12:21 -0400)
committerDavid Wells <drwells@email.unc.edu>
Fri, 21 May 2021 16:35:50 +0000 (12:35 -0400)
We don't want to print thousands of lines.

examples/step-78/step-78.cc

index bb2cd42b4976458203f2f4731e111315c4f3d050..e56a6ab22b472f091b980a5f76089fffe5b67fa4 100644 (file)
@@ -533,8 +533,6 @@ namespace BlackScholesSolver
     preconditioner.initialize(system_matrix, 1.0);
     cg.solve(system_matrix, solution, system_rhs, preconditioner);
     constraints.distribute(solution);
-    std::cout << "     " << solver_control.last_step() << " CG iterations."
-              << std::endl;
   }
 
   // @sect4{<code>BlackScholes::add_results_for_output</code>}
@@ -751,8 +749,10 @@ namespace BlackScholesSolver
           {
             time += time_step;
             ++timestep_number;
-            std::cout << "Time step " << timestep_number << " at t=" << time
-                      << std::endl;
+
+            if (timestep_number % 1000 == 0)
+              std::cout << "Time step " << timestep_number << " at t=" << time
+                        << std::endl;
 
             mass_matrix.vmult(system_rhs, solution);
 

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.