]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix SolverSelector test with new interface. We also need to set a SolverControl in...
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Oct 2010 19:00:41 +0000 (19:00 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Oct 2010 19:00:41 +0000 (19:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@22315 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/solver_selector_01.cc
tests/lac/solver_selector_01/cmp/generic

index 8ce9355626e5fa8261a8655cbda370cc538f29e9..ccc5e9e7f9c60655f95d9bfefd747e3d30d3941f 100644 (file)
@@ -10,6 +10,7 @@
 //
 //----------------------------------------------------------------------
 
+// Test the SolverSelector class.
 
 #include "../tests.h"
 #include "testmatrix.h"
@@ -31,23 +32,18 @@ check(const MATRIX& A, const VECTOR& f)
   names.push_back("gmres");
   names.push_back("fgmres");
 
+  ReductionControl cont1(100, 0., 1.e-4);
+  SolverControl cont2(100, 1.e-7);
   SolverSelector<VECTOR> solver;
   PreconditionSSOR<SparseMatrix<double> > pre;
   pre.initialize(A);
   
   VECTOR u;
   u.reinit(f);
-  
-  std::vector<std::string>::const_iterator name;
-  for (name = names.begin(); name != names.end();++name)
-    {
-      solver.select(*name);
-      u = 0.;
-      solver.solve(A, u, f, pre);
-    }
 
-  ReductionControl cont1(100, 0., 1.e-4);
-  solver.control = cont1;
+  std::vector<std::string>::const_iterator name;
+  
+  solver.set_control(cont1);
   for (name = names.begin(); name != names.end();++name)
     {
       solver.select(*name);
@@ -55,8 +51,7 @@ check(const MATRIX& A, const VECTOR& f)
       solver.solve(A, u, f, pre);
     }
   
-  SolverControl cont2(100, 1.e-7);
-  solver.control = cont2;
+  solver.set_control(cont2);
   for (name = names.begin(); name != names.end();++name)
     {
       solver.select(*name);
index 983fde2641f6dd754fc7bbbb9c94aa650438a31a..200218e23028bbb68394adab4d6c82b25dd9de1b 100644 (file)
@@ -1,14 +1,6 @@
 
 DEAL::Size 37 Unknowns 1296
 DEAL:cg::Starting value 36.00
-DEAL:cg::Convergence step 14 value 0.2102
-DEAL:Bicgstab::Starting value 36.00
-DEAL:Bicgstab::Convergence step 5 value 0.2814
-DEAL:GMRES::Starting value 34.45
-DEAL:GMRES::Convergence step 13 value 0.1890
-DEAL:FGMRES::Starting value 36.00
-DEAL:FGMRES::Convergence step 13 value 0.2928
-DEAL:cg::Starting value 36.00
 DEAL:cg::Convergence step 21 value 0.003095
 DEAL:Bicgstab::Starting value 36.00
 DEAL:Bicgstab::Convergence step 10 value 0.003158

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.