From 1a5dabbf7b32362403ed7f77e8684f77bcda746b Mon Sep 17 00:00:00 2001 From: kronbichler Date: Wed, 3 Sep 2008 12:38:53 +0000 Subject: [PATCH] There were some unnecessary include files. Moreover, let the Stokes linear solver start with the previous solution instead of initializing the vector to zero. We changed this some time ago since it was faster when we had to copy deal.II matrices to Trilinos objects and negelected some small elements, but now things seem to be alright again and a good initial guess as obtained from the previous time step accelerates the GMRES convergence. git-svn-id: https://svn.dealii.org/trunk@16726 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-31/step-31.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/deal.II/examples/step-31/step-31.cc b/deal.II/examples/step-31/step-31.cc index f3e74d5b95..2936194255 100644 --- a/deal.II/examples/step-31/step-31.cc +++ b/deal.II/examples/step-31/step-31.cc @@ -21,15 +21,12 @@ #include #include -#include #include -#include #include #include -#include -#include -#include +#include #include +#include #include #include @@ -65,8 +62,6 @@ #include - // This is Trilinos - // Next, we import all deal.II // names into global namespace using namespace dealii; @@ -1797,13 +1792,13 @@ void BoussinesqFlowProblem::solve () // Set up GMRES solver and // solve. - SolverControl solver_control (20*stokes_matrix.m(), + SolverControl solver_control (stokes_matrix.m(), 1e-6*stokes_rhs.l2_norm()); SolverGMRES gmres(solver_control, SolverGMRES::AdditionalData(100)); - stokes_solution = 0; + //stokes_solution = 0; gmres.solve(stokes_matrix, stokes_solution, stokes_rhs, preconditioner); std::cout << " " -- 2.39.5