]> https://gitweb.dealii.org/ - dealii.git/commitdiff
added avg reduction test to solver_control_02 5551/head
authorjodlbauer <jdschule@gmx.at>
Wed, 29 Nov 2017 12:53:14 +0000 (13:53 +0100)
committerjodlbauer <jdschule@gmx.at>
Wed, 29 Nov 2017 12:53:14 +0000 (13:53 +0100)
tests/lac/solver_control_02.cc
tests/lac/solver_control_02.output

index ca48942cf16dac46a1b369ca7424b76743bd05d1..66f50884bac5a8d77a61cd47b9d71f3684133a17 100644 (file)
@@ -110,5 +110,14 @@ int main(int argc, char **argv)
       check_solve (solver_control, A,u,f, preconditioner, false);
     }
     deallog.pop();
+    deallog.push("Avg reduction");
+    {
+      // Expects success
+      ReductionControl solver_control(2000, 1.e-3, 1e-9);
+      solver_control.enable_history_data();
+      check_solve (solver_control, A,u,f, preconditioner, true);
+      deallog << solver_control.average_reduction() << std::endl;
+    }
+    deallog.pop();
   }
 }
index 4ddd995402ef54a449bd8913352b7a4288e13fe9..1eed03746b1772f6d5fc93164ed7b8e735b8f486 100644 (file)
@@ -9,3 +9,7 @@ DEAL:Abs tol::Success. Solver stopped after 43 iterations
 DEAL:Iterations:cg::Starting value 31.0000
 DEAL:Iterations:cg::Failure step 20 value 6.00198
 DEAL:Iterations::Failure. Solver stopped after 20 iterations
+DEAL:Avg reduction:cg::Starting value 31.0000
+DEAL:Avg reduction:cg::Convergence step 43 value 0.000818932
+DEAL:Avg reduction::Success. Solver stopped after 43 iterations
+DEAL:Avg reduction::0.782586

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.