// 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>
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);
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
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
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
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
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
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