]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
SolverControl fix for PETSc Richardson method.
authorprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 May 2007 10:05:55 +0000 (10:05 +0000)
committerprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 May 2007 10:05:55 +0000 (10:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@14686 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_solver.cc

index 59d2f97d71186da88030740d3e3e4731a5161a93..36102d81e03ac34daec3fc5d4e8bb1c81f250287 100644 (file)
@@ -290,6 +290,22 @@ namespace PETScWrappers
                                      // honor the initial guess in the
                                      // solution vector. do so here as well:
     KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+
+                                    // Hand over the absolute
+                                    // tolerance and the maximum
+                                    // iteration number to the PETSc
+                                    // convergence criterion. The
+                                    // custom deal.II SolverControl
+                                    // object is ignored by the PETSc
+                                    // Richardson method (when no
+                                    // PETSc monitoring is present),
+                                    // since in this case PETSc
+                                    // uses a faster version of
+                                    // the Richardson iteration,
+                                    // where no residual is
+                                    // available.
+    KSPSetTolerances(ksp, PETSC_DEFAULT, this->solver_control.tolerance(),
+                    PETSC_DEFAULT, this->solver_control.max_steps());
   }
   
 

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.