From 07dcfc7365558de0a1653b99644154ae351a64e2 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 7 May 2013 07:01:29 +0000 Subject: [PATCH] Make test work git-svn-id: https://svn.dealii.org/trunk@29470 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/lac/bicgstab_large.cc | 12 ++++-------- tests/lac/bicgstab_large/cmp/generic | 20 +++++++------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/tests/lac/bicgstab_large.cc b/tests/lac/bicgstab_large.cc index 13262582a0..665c2f6ae4 100644 --- a/tests/lac/bicgstab_large.cc +++ b/tests/lac/bicgstab_large.cc @@ -44,8 +44,7 @@ int main() M.diag_element(3) = 42; Vector rhs(4); - rhs(0) = rhs(2) = 0; - rhs(1) = rhs(3) = 0.0975; + rhs = 1; Vector solution (4); @@ -55,8 +54,7 @@ int main() bicgstab.solve (M, solution, rhs, PreconditionIdentity()); } - for (unsigned int i=0; i<4; ++i) - deallog << solution(i) << std::endl; + solution.print(deallog); Vector res (4); M.residual (res, solution, rhs); @@ -68,16 +66,14 @@ int main() SparseMatrix M1 (sparsity_pattern); M1.add(1e10,M); rhs *= 1e10; + solution = 0; { SolverControl control(100, 1.e7); SolverBicgstab<> bicgstab(control); bicgstab.solve (M1, solution, rhs, PreconditionIdentity()); } - - for (unsigned int i=0; i<4; ++i) - deallog << solution(i) << std::endl; - + solution.print(deallog); M1.residual (res, solution, rhs); deallog << "residual=" << res.l2_norm() << std::endl; diff --git a/tests/lac/bicgstab_large/cmp/generic b/tests/lac/bicgstab_large/cmp/generic index 6946662a5a..abf5725509 100644 --- a/tests/lac/bicgstab_large/cmp/generic +++ b/tests/lac/bicgstab_large/cmp/generic @@ -1,15 +1,9 @@ -DEAL:Bicgstab::Starting value 0.1379 -DEAL:Bicgstab::Convergence step 2 value 0 -DEAL::0 -DEAL::0.009750 -DEAL::0 -DEAL::0.002321 +DEAL:Bicgstab::Starting value 2.000 +DEAL:Bicgstab::Convergence step 4 value 0 +DEAL::1.000 0.1000 0.09091 0.02381 DEAL::residual=0 -DEAL:Bicgstab::Starting value 2.384e-07 -DEAL:Bicgstab::Convergence step 0 value 2.384e-07 -DEAL::0 -DEAL::0.009750 -DEAL::0 -DEAL::0.002321 -DEAL::residual=2.384e-07 +DEAL:Bicgstab::Starting value 2.000e+10 +DEAL:Bicgstab::Convergence step 4 value 0.001939 +DEAL::1.000 0.1000 0.09091 0.02381 +DEAL::residual=0.001937 -- 2.39.5