From 9833429eb5fcf4017bd2b9359410bf3bc2477e7e Mon Sep 17 00:00:00 2001 From: heister Date: Fri, 8 Nov 2013 13:25:28 +0000 Subject: [PATCH] make multigrid test succeed by switching from CG to GMRES. I have no idea if the problem should be SPD and if CG should work, though. git-svn-id: https://svn.dealii.org/trunk@31588 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/multigrid/step-39-03.cc | 7 ++++++- tests/multigrid/step-39-03.output | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/tests/multigrid/step-39-03.cc b/tests/multigrid/step-39-03.cc index 87e33b7662..0018db3b9e 100644 --- a/tests/multigrid/step-39-03.cc +++ b/tests/multigrid/step-39-03.cc @@ -18,10 +18,15 @@ // Multigrid with continuous and discontinuous elements works, if we // enforce continuity at refinement edges through interior penalty +// TH: the test was failing because the solver did not converge. It turns out +// that switching from CG to GMRES makes everything work. I have no idea +// if the problem is not SPD... + #include "../tests.h" #include #include #include +#include #include #include #include @@ -524,7 +529,7 @@ namespace Step39 InteriorPenaltyProblem::solve() { SolverControl control(1000, 1.e-12); - SolverCG > solver(control); + SolverGMRES > solver(control); MGTransferPrebuilt > mg_transfer; mg_transfer.build_matrices(mg_dof_handler); diff --git a/tests/multigrid/step-39-03.output b/tests/multigrid/step-39-03.output index 2fa57e7207..b62d5259b5 100644 --- a/tests/multigrid/step-39-03.output +++ b/tests/multigrid/step-39-03.output @@ -7,8 +7,8 @@ DEAL::Assemble matrix DEAL::Assemble multilevel matrix DEAL::Assemble right hand side DEAL::Solve -DEAL:cg::Starting value 33.0698 -DEAL:cg::Convergence step 11 value 6.72426e-14 +DEAL:GMRES::Starting value 9.41508 +DEAL:GMRES::Convergence step 10 value 7.45877e-13 DEAL::energy-error: 0.439211 DEAL::L2-error: 0.0109342 DEAL::Estimate 0.979555 @@ -21,8 +21,8 @@ DEAL::Assemble matrix DEAL::Assemble multilevel matrix DEAL::Assemble right hand side DEAL::Solve -DEAL:cg::Starting value 33.0698 -DEAL:cg::Convergence step 15 value 2.96056e-13 +DEAL:GMRES::Starting value 9.98895 +DEAL:GMRES::Convergence step 21 value 1.04294e-13 DEAL::energy-error: 0.332582 DEAL::L2-error: 0.00548996 DEAL::Estimate 0.838060 @@ -35,8 +35,8 @@ DEAL::Assemble matrix DEAL::Assemble multilevel matrix DEAL::Assemble right hand side DEAL::Solve -DEAL:cg::Starting value 33.0698 -DEAL:cg::Convergence step 16 value 2.80366e-13 +DEAL:GMRES::Starting value 10.7902 +DEAL:GMRES::Convergence step 28 value 4.34099e-13 DEAL::energy-error: 0.237705 DEAL::L2-error: 0.00250869 DEAL::Estimate 0.611449 @@ -49,8 +49,8 @@ DEAL::Assemble matrix DEAL::Assemble multilevel matrix DEAL::Assemble right hand side DEAL::Solve -DEAL:cg::Starting value 33.6744 -DEAL:cg::Convergence step 19 value 2.93617e-13 +DEAL:GMRES::Starting value 12.1830 +DEAL:GMRES::Convergence step 33 value 5.33786e-13 DEAL::energy-error: 0.170860 DEAL::L2-error: 0.00120805 DEAL::Estimate 0.452418 @@ -63,8 +63,8 @@ DEAL::Assemble matrix DEAL::Assemble multilevel matrix DEAL::Assemble right hand side DEAL::Solve -DEAL:cg::Starting value 37.2775 -DEAL:cg::Convergence step 19 value 6.03920e-13 +DEAL:GMRES::Starting value 15.5674 +DEAL:GMRES::Convergence step 34 value 3.96471e-13 DEAL::energy-error: 0.122755 DEAL::L2-error: 0.000602816 DEAL::Estimate 0.332525 @@ -77,8 +77,8 @@ DEAL::Assemble matrix DEAL::Assemble multilevel matrix DEAL::Assemble right hand side DEAL::Solve -DEAL:cg::Starting value 39.0422 -DEAL:cg::Convergence step 19 value 1.93273e-13 +DEAL:GMRES::Starting value 18.7536 +DEAL:GMRES::Convergence step 33 value 6.84534e-13 DEAL::energy-error: 0.0869445 DEAL::L2-error: 0.000292783 DEAL::Estimate 0.236647 -- 2.39.5