]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
make multigrid test succeed by switching from CG to GMRES. I have no idea if the...
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Nov 2013 13:25:28 +0000 (13:25 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Nov 2013 13:25:28 +0000 (13:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@31588 0785d39b-7218-0410-832d-ea1e28bc413d

tests/multigrid/step-39-03.cc
tests/multigrid/step-39-03.output

index 87e33b7662f26db229aa8d306c5beedb61c9915f..0018db3b9e887391b5ee8672b05a07b8857b4c74 100644 (file)
 // 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 <deal.II/lac/sparse_matrix.h>
 #include <deal.II/lac/compressed_sparsity_pattern.h>
 #include <deal.II/lac/solver_cg.h>
+#include <deal.II/lac/solver_gmres.h>
 #include <deal.II/lac/precondition.h>
 #include <deal.II/lac/precondition_block.h>
 #include <deal.II/lac/block_vector.h>
@@ -524,7 +529,7 @@ namespace Step39
   InteriorPenaltyProblem<dim>::solve()
   {
     SolverControl control(1000, 1.e-12);
-    SolverCG<Vector<double> > solver(control);
+    SolverGMRES<Vector<double> > solver(control);
 
     MGTransferPrebuilt<Vector<double> > mg_transfer;
     mg_transfer.build_matrices(mg_dof_handler);
index 2fa57e7207b03d0ecf4a1ef78a5ce4e791703526..b62d5259b57288b0805da17f4de8046b284efde5 100644 (file)
@@ -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

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.