]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make step-93 compile. 18520/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 30 May 2025 17:14:14 +0000 (11:14 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 30 May 2025 17:14:33 +0000 (11:14 -0600)
examples/step-93/step-93.cc

index bcb2d5a2e4961b10136d7fdfc2f7b322731a1b1f..3c0da0b526c53f45e572fd72f07d2abd1467f406 100644 (file)
@@ -642,17 +642,18 @@ namespace Step93
   template <int dim>
   void Step93<dim>::solve()
   {
+    Timer timer;
+    timer.start();
+
     std::cout << "Beginning solve..." << std::endl;
-    {
-      Timer timer;
 
-      SolverControl solver_control(1'000'000, 1e-6 * system_rhs.l2_norm());
-      SolverMinRes<Vector<double>> solver(solver_control);
+    SolverControl solver_control(1'000'000, 1e-6 * system_rhs.l2_norm());
+    SolverMinRes<Vector<double>> solver(solver_control);
 
-      solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity());
+    solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity());
+
+    timer.stop();
 
-      timer.stop();
-    }
     std::cout << "Wall time: " << timer.wall_time() << "s" << std::endl;
     std::cout << "Solved in " << solver_control.last_step()
               << " MINRES iterations." << std::endl;

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.