]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add test for PreconditionPSOR
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 25 Apr 2003 08:50:02 +0000 (08:50 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 25 Apr 2003 08:50:02 +0000 (08:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@7476 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/solver.cc

index a3749515d69644fa1b923e3b48c79db9fbbd4d8e..dc54ef4c80f3c37794cd127d20fbc10063e081c7 100644 (file)
@@ -82,6 +82,13 @@ int main()
       prec_sor.initialize(A, 1.2);
       PreconditionSSOR<> prec_ssor;
       prec_ssor.initialize(A, 1.2);
+
+      std::vector<unsigned int> permutation(dim);
+      for (unsigned int i=0;i<dim;++i)
+       permutation(i) = dim-i-1;
+      
+      PreconditionPSOR<> prec_psor;
+      prec_psor.initialize(A, permutation, 1.2);
       
       Vector<double>  f(dim);
       Vector<double>  u(dim);
@@ -137,6 +144,13 @@ int main()
          check_method(bicgstab,A,u,f,prec_sor);
          check_method(gmres,A,u,f,prec_sor);
          
+         deallog.push("psor");
+         
+         check_method(rich,A,u,f,prec_psor);
+         check_method(cg,A,u,f,prec_psor);
+         check_method(bicgstab,A,u,f,prec_psor);
+         check_method(gmres,A,u,f,prec_psor);
+         
          deallog.pop();
        }
       catch (std::exception& e)

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.