From: kanschat Date: Fri, 17 Jun 2011 23:17:04 +0000 (+0000) Subject: test permutation in RelaxationBlock X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08f7f1cdb3e2e32cf05895e6fac4aaa147c3c964;p=dealii-svn.git test permutation in RelaxationBlock git-svn-id: https://svn.dealii.org/trunk@23842 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/lac/solver_relaxation_03.cc b/tests/lac/solver_relaxation_03.cc index 58f6a4d51e..205244cef7 100644 --- a/tests/lac/solver_relaxation_03.cc +++ b/tests/lac/solver_relaxation_03.cc @@ -145,13 +145,16 @@ int main() PreconditionBlockSSOR,double> prec_bssor; prec_bssor.initialize(A, bperm, ibperm, prec_data); -// RelaxationBlockSOR,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,double> relax_ssor; -// relax_sor.set_permutation(bperm,ibperm); -// relax_ssor.initialize(A, relax_data); + RelaxationBlockSOR,double> relax_sor; + relax_sor.initialize(A, relax_data); + + RelaxationBlockSSOR,double> relax_ssor; + relax_ssor.initialize(A, relax_data); Vector f(dim); Vector 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(); } diff --git a/tests/lac/solver_relaxation_03/cmp/generic b/tests/lac/solver_relaxation_03/cmp/generic index 13811e1466..c32d174766 100644 --- a/tests/lac/solver_relaxation_03/cmp/generic +++ b/tests/lac/solver_relaxation_03/cmp/generic @@ -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