]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
test permutation in RelaxationBlock
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 17 Jun 2011 23:17:04 +0000 (23:17 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 17 Jun 2011 23:17:04 +0000 (23:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@23842 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/solver_relaxation_03.cc
tests/lac/solver_relaxation_03/cmp/generic

index 58f6a4d51ead5744d5664368256b69314a6bb644..205244cef7098e9b6639a18a141b532c0e311db6 100644 (file)
@@ -145,13 +145,16 @@ int main()
          PreconditionBlockSSOR<SparseMatrix<double>,double> prec_bssor;
          prec_bssor.initialize(A, bperm, ibperm, prec_data);
 
-//       RelaxationBlockSOR<SparseMatrix<double>,double> relax_sor;
-//       relax_sor.set_permutation(bperm,ibperm);
-//       relax_sor.initialize(A, relax_data);
+         relax_data.order.resize(1);
+         relax_data.order[0].resize(bperm.size());
+         for (unsigned int i=0;i<bperm.size();++i)
+           relax_data.order[0][i] = bperm[i];
          
-//       RelaxationBlockSSOR<SparseMatrix<double>,double> relax_ssor;
-//       relax_sor.set_permutation(bperm,ibperm);
-//       relax_ssor.initialize(A, relax_data);
+         RelaxationBlockSOR<SparseMatrix<double>,double> relax_sor;
+         relax_sor.initialize(A, relax_data);
+         
+         RelaxationBlockSSOR<SparseMatrix<double>,double> relax_ssor;
+         relax_ssor.initialize(A, relax_data);
          
          Vector<double>  f(dim);
          Vector<double>  u(dim);
@@ -180,6 +183,8 @@ int main()
              deallog << "diff " << std::fabs(r1-r2)/r1 << std::endl;
              r2 = check_solve(relax,A,u,f,prec_bsor2);
              deallog << "diff " << std::fabs(r1-r2)/r1 << std::endl;
+             r2 = check_solve(relax,A,u,f,relax_sor);
+             deallog << "diff " << std::fabs(r1-r2)/r1 << std::endl;
              deallog.pop();
              
              deallog.push("SSOR  ");
@@ -188,6 +193,8 @@ int main()
              deallog << "diff " << std::fabs(r1-r2)/r1 << std::endl;
              r2 = check_solve(relax,A,u,f,prec_bssor);
              deallog << "diff " << std::fabs(r1-r2)/r1 << std::endl;
+             r2 = check_solve(relax,A,u,f,relax_ssor);
+             deallog << "diff " << std::fabs(r1-r2)/r1 << std::endl;
              deallog.pop();
              
            }
index 13811e14665bffcf3a6eb9df8b0b2100b328c075..c32d174766fb68d55958f48fcf9484716886645e 100644 (file)
@@ -21,6 +21,9 @@ DEAL:SOR   ::diff 0
 DEAL:SOR   :Relaxation::Starting value 32.00
 DEAL:SOR   :Relaxation::Failure step 10 value 24.60
 DEAL:SOR   ::diff 0
+DEAL:SOR   :Relaxation::Starting value 32.00
+DEAL:SOR   :Relaxation::Failure step 10 value 24.60
+DEAL:SOR   ::diff 0
 DEAL:SSOR  :Richardson::Starting value 32.00
 DEAL:SSOR  :Richardson::Failure step 10 value 21.41
 DEAL:SSOR  :Relaxation::Starting value 32.00
@@ -29,6 +32,9 @@ DEAL:SSOR  ::diff 0
 DEAL:SSOR  :Relaxation::Starting value 32.00
 DEAL:SSOR  :Relaxation::Failure step 10 value 21.41
 DEAL:SSOR  ::diff 0
+DEAL:SSOR  :Relaxation::Starting value 32.00
+DEAL:SSOR  :Relaxation::Failure step 10 value 21.41
+DEAL:SSOR  ::diff 0
 DEAL::Block size 8
 DEAL::Size 128
 DEAL:Jacobi:Richardson::Starting value 32.00
@@ -50,6 +56,9 @@ DEAL:SOR   ::diff 0
 DEAL:SOR   :Relaxation::Starting value 32.00
 DEAL:SOR   :Relaxation::Failure step 10 value 23.66
 DEAL:SOR   ::diff 0
+DEAL:SOR   :Relaxation::Starting value 32.00
+DEAL:SOR   :Relaxation::Failure step 10 value 23.66
+DEAL:SOR   ::diff 0
 DEAL:SSOR  :Richardson::Starting value 32.00
 DEAL:SSOR  :Richardson::Failure step 10 value 19.22
 DEAL:SSOR  :Relaxation::Starting value 32.00
@@ -58,6 +67,9 @@ DEAL:SSOR  ::diff 0
 DEAL:SSOR  :Relaxation::Starting value 32.00
 DEAL:SSOR  :Relaxation::Failure step 10 value 19.22
 DEAL:SSOR  ::diff 0
+DEAL:SSOR  :Relaxation::Starting value 32.00
+DEAL:SSOR  :Relaxation::Failure step 10 value 19.22
+DEAL:SSOR  ::diff 0
 DEAL::Block size 16
 DEAL::Size 64
 DEAL:Jacobi:Richardson::Starting value 32.00
@@ -79,6 +91,9 @@ DEAL:SOR   ::diff 0
 DEAL:SOR   :Relaxation::Starting value 32.00
 DEAL:SOR   :Relaxation::Failure step 10 value 22.95
 DEAL:SOR   ::diff 0
+DEAL:SOR   :Relaxation::Starting value 32.00
+DEAL:SOR   :Relaxation::Failure step 10 value 22.95
+DEAL:SOR   ::diff 0
 DEAL:SSOR  :Richardson::Starting value 32.00
 DEAL:SSOR  :Richardson::Failure step 10 value 17.41
 DEAL:SSOR  :Relaxation::Starting value 32.00
@@ -87,3 +102,6 @@ DEAL:SSOR  ::diff 0
 DEAL:SSOR  :Relaxation::Starting value 32.00
 DEAL:SSOR  :Relaxation::Failure step 10 value 17.41
 DEAL:SSOR  ::diff 0
+DEAL:SSOR  :Relaxation::Starting value 32.00
+DEAL:SSOR  :Relaxation::Failure step 10 value 17.41
+DEAL:SSOR  ::diff 0

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.