]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Manually deal with outputting the number of iterations in step-39.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 11 Jul 2024 16:22:50 +0000 (10:22 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 27 Jan 2025 20:31:34 +0000 (13:31 -0700)
examples/step-39/doc/results.dox
examples/step-39/step-39.cc
tests/examples/step-39.output

index 25a47ac4dacdaccf5ea9b60671bdf35eb606e064..1325699cb8bd90ab6647e6ef50b0fd68a02df393 100644 (file)
@@ -12,8 +12,7 @@ DEAL::Assemble matrix
 DEAL::Assemble multilevel matrix
 DEAL::Assemble right hand side
 DEAL::Solve
-DEAL:cg::Starting value 37.4071
-DEAL:cg::Convergence step 13 value 1.64974e-13
+DEAL::Converged in 13 iterations
 DEAL::energy-error: 0.297419
 DEAL::L2-error:     0.00452447
 DEAL::Estimate 0.990460
@@ -26,26 +25,11 @@ DEAL::Assemble matrix
 DEAL::Assemble multilevel matrix
 DEAL::Assemble right hand side
 DEAL::Solve
-DEAL:cg::Starting value 37.4071
-DEAL:cg::Convergence step 14 value 3.72262e-13
+DEAL::Converged in 14 iterations
 DEAL::energy-error: 0.258559
 DEAL::L2-error:     0.00288510
 DEAL::Estimate 0.738624
 DEAL::Writing solution to <sol-01.gnuplot>...
-DEAL::
-DEAL::Step 2
-DEAL::Triangulation 34 cells, 4 levels
-DEAL::DoFHandler 544 dofs, level dofs 64 256 256 128
-DEAL::Assemble matrix
-DEAL::Assemble multilevel matrix
-DEAL::Assemble right hand side
-DEAL::Solve
-DEAL:cg::Starting value 37.4071
-DEAL:cg::Convergence step 15 value 1.91610e-13
-DEAL::energy-error: 0.189234
-DEAL::L2-error:     0.00147954
-DEAL::Estimate 0.657507
-DEAL::Writing solution to <sol-02.gnuplot>...
 
 ...
 
@@ -56,8 +40,7 @@ DEAL::Assemble matrix
 DEAL::Assemble multilevel matrix
 DEAL::Assemble right hand side
 DEAL::Solve
-DEAL:cg::Starting value 51.1571
-DEAL:cg::Convergence step 15 value 7.19599e-13
+DEAL::Converged in 15 iterations
 DEAL::energy-error: 0.0132475
 DEAL::L2-error:     1.00423e-05
 DEAL::Estimate 0.0470724
@@ -70,8 +53,7 @@ DEAL::Assemble matrix
 DEAL::Assemble multilevel matrix
 DEAL::Assemble right hand side
 DEAL::Solve
-DEAL:cg::Starting value 52.2226
-DEAL:cg::Convergence step 15 value 8.15195e-13
+DEAL::Converged in 15 iterations
 DEAL::energy-error: 0.00934891
 DEAL::L2-error:     5.41095e-06
 DEAL::Estimate 0.0329102
index f4b1541eec7ea9ec5d9e51843b2b6141328fd449..b594c115d2e9f3ca8f40aa386df3e46947ef90ba 100644 (file)
@@ -837,6 +837,9 @@ namespace Step39
       preconditioner(dof_handler, mg, mg_transfer);
     // and use it to solve the system.
     solver.solve(matrix, solution, right_hand_side, preconditioner);
+
+    deallog << "Converged in " << control.last_step() << " iterations"
+            << std::endl;
   }
 
 
index 40579e254fc639727f13be266f1cace975619681..8082a8061f8d02b65fdf476f72670d7c28b37083 100644 (file)
@@ -6,8 +6,7 @@ DEAL::Assemble matrix
 DEAL::Assemble multilevel matrix
 DEAL::Assemble right hand side
 DEAL::Solve
-DEAL:cg::Starting value 37.4071
-DEAL:cg::Convergence step 13 value 1.64974e-13
+DEAL::Converged in 13 iterations
 DEAL::energy-error: 0.297419
 DEAL::L2-error:     0.00452447
 DEAL::Estimate 0.990460
@@ -20,8 +19,7 @@ DEAL::Assemble matrix
 DEAL::Assemble multilevel matrix
 DEAL::Assemble right hand side
 DEAL::Solve
-DEAL:cg::Starting value 37.4071
-DEAL:cg::Convergence step 14 value 3.72262e-13
+DEAL::Converged in 14 iterations
 DEAL::energy-error: 0.258559
 DEAL::L2-error:     0.00288510
 DEAL::Estimate 0.738624
@@ -34,8 +32,7 @@ DEAL::Assemble matrix
 DEAL::Assemble multilevel matrix
 DEAL::Assemble right hand side
 DEAL::Solve
-DEAL:cg::Starting value 37.4071
-DEAL:cg::Convergence step 15 value 1.91610e-13
+DEAL::Converged in 15 iterations
 DEAL::energy-error: 0.189234
 DEAL::L2-error:     0.00147954
 DEAL::Estimate 0.657507

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.