]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
test for failed iterations, too
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 May 2002 11:14:40 +0000 (11:14 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 May 2002 11:14:40 +0000 (11:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@5926 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/solver.cc
tests/lac/solver.checked

index 9d6597563fea2e720024a1cde650b60131720663..f5520064639b9d46b7c805ed8fbe6526cb93af4d 100644 (file)
@@ -36,7 +36,14 @@ check_method( SOLVER& solver, const MATRIX& A,
 {
   u = 0.;
   f = 1.;
-  solver.solve(A,u,f,P);
+  try 
+    {
+      solver.solve(A,u,f,P);
+    }
+  catch (std::exception& e)
+    {
+      deallog << e.what() << std::endl;
+    }  
 }
 
 int main()
@@ -51,7 +58,7 @@ int main()
   SolverControl control(100, 1.e-3);
   SolverControl verbose_control(100, 1.e-3, true);
   SolverCG<> cg(control, mem);
-  SolverGMRES<> gmres(control, mem,20);
+  SolverGMRES<> gmres(control, mem, 8);
   SolverBicgstab<> bicgstab(control, mem);
   SolverRichardson<> rich(control, mem);
   SolverQMRS<> qmrs(control, mem);
@@ -93,6 +100,17 @@ int main()
 
       try
        {
+         deallog.push("no-fail");
+
+         control.set_max_steps(10);
+         check_method(cg,A,u,f,prec_no);
+         check_method(bicgstab,A,u,f,prec_no);
+         check_method(gmres,A,u,f,prec_no);
+         check_method(qmrs,A,u,f,prec_no);
+         control.set_max_steps(100);
+         
+         deallog.pop();
+         
          deallog.push("no");
          
          check_method(cg,A,u,f,prec_no);
@@ -115,15 +133,7 @@ int main()
          deallog.push("sor");
          
          check_method(rich,A,u,f,prec_sor);
-         try 
-           {
-             check_method(cg,A,u,f,prec_sor);
-           }
-         catch (std::exception& e)
-           {
-             deallog << e.what() << std::endl;
-           }
-         
+         check_method(cg,A,u,f,prec_sor);
          check_method(bicgstab,A,u,f,prec_sor);
          check_method(gmres,A,u,f,prec_sor);
          
index 708c247ba70586cdfdabdf542c962dc1705b5d3c..5ac71089273ce5594aaa55dc14778f3e72d98180 100644 (file)
@@ -1,6 +1,14 @@
 
 DEAL::Size 4 Unknowns 9
 DEAL::SOR-diff:0.00
+DEAL:no-fail:cg::Starting 
+DEAL:no-fail:cg::Convergence step 3 
+DEAL:no-fail:Bicgstab::Starting 
+DEAL:no-fail:Bicgstab::Convergence step 3 
+DEAL:no-fail:GMRES::Starting 
+DEAL:no-fail:GMRES::Convergence step 3 
+DEAL:no-fail:QMRS::Starting 
+DEAL:no-fail:QMRS::Convergence step 3 
 DEAL:no:cg::Starting 
 DEAL:no:cg::Convergence step 3 
 DEAL:no:Bicgstab::Starting 
@@ -23,19 +31,31 @@ DEAL:sor:Richardson::Starting
 DEAL:sor:Richardson::Convergence step 7 
 DEAL:sor:cg::Starting 
 DEAL:sor:cg::Failure step 100 
-DEAL:sor::Iterative method reported convergence failure in step 100 with residual 0.258509
+DEAL:sor::Iterative method reported convergence failure in step 100 
 DEAL:sor:Bicgstab::Starting 
 DEAL:sor:Bicgstab::Convergence step 5 
 DEAL:sor:GMRES::Starting 
 DEAL:sor:GMRES::Convergence step 5 
 DEAL::Size 12 Unknowns 121
 DEAL::SOR-diff:0.00
+DEAL:no-fail:cg::Starting 
+DEAL:no-fail:cg::Failure step 10 
+DEAL:no-fail::Iterative method reported convergence failure in step 10 
+DEAL:no-fail:Bicgstab::Starting 
+DEAL:no-fail:Bicgstab::Failure step 10 
+DEAL:no-fail::Iterative method reported convergence failure in step 10 
+DEAL:no-fail:GMRES::Starting 
+DEAL:no-fail:GMRES::Failure step 10 
+DEAL:no-fail::Iterative method reported convergence failure in step 10 
+DEAL:no-fail:QMRS::Starting 
+DEAL:no-fail:QMRS::Failure step 10 
+DEAL:no-fail::Iterative method reported convergence failure in step 10 
 DEAL:no:cg::Starting 
 DEAL:no:cg::Convergence step 15 
 DEAL:no:Bicgstab::Starting 
 DEAL:no:Bicgstab::Convergence step 11 
 DEAL:no:GMRES::Starting 
-DEAL:no:GMRES::Convergence step 15 
+DEAL:no:GMRES::Convergence step 43 
 DEAL:no:QMRS::Starting 
 DEAL:no:QMRS::Convergence step 16 
 DEAL:ssor:Richardson::Starting 
@@ -52,10 +72,10 @@ DEAL:sor:Richardson::Starting
 DEAL:sor:Richardson::Convergence step 88 
 DEAL:sor:cg::Starting 
 DEAL:sor:cg::Failure step 100 
-DEAL:sor::Iterative method reported convergence failure in step 100 with residual 5.64329
+DEAL:sor::Iterative method reported convergence failure in step 100 
 DEAL:sor:Bicgstab::Starting 
 DEAL:sor:Bicgstab::Convergence step 14 
 DEAL:sor:GMRES::Starting 
-DEAL:sor:GMRES::Convergence step 20 
-DEAL::GrowingVectorMemory:Overall allocated vectors: 163
-DEAL::GrowingVectorMemory:Maximum allocated vectors: 20
+DEAL:sor:GMRES::Convergence step 23 
+DEAL::GrowingVectorMemory:Overall allocated vectors: 188
+DEAL::GrowingVectorMemory:Maximum allocated vectors: 8

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.