]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Upgraded: PETSc solvers to migrate to PETSc 3.0.0
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Mar 2009 13:11:25 +0000 (13:11 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Mar 2009 13:11:25 +0000 (13:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@18531 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/petsc_solver.h
deal.II/lac/source/petsc_solver.cc

index 0f51cedd215a6ff493fceb6b298c1715212c0e4b..742582aca571be78c95be2573492720db8f6d0a8 100644 (file)
@@ -668,8 +668,6 @@ namespace PETScWrappers
       virtual void set_solver_type (KSP &ksp) const;
   };
 
-
-
 /**
  * An implementation of the solver interface using the PETSc CG Squared
  * solver.
index beaf53fa9f7edf88307422c79a1e8acb8cf449a2..907837d42a29bcdcfef3b457d612be3b02caf764 100644 (file)
@@ -163,8 +163,15 @@ namespace PETScWrappers
                                          // checks with the solver_control
                                          // object we have in this object for
                                          // convergence
+#if (PETSC_VERSION_MAJOR <= 2) 
         KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
                                reinterpret_cast<void *>(&solver_control));
+#else
+        KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
+                               reinterpret_cast<void *>(&solver_control),
+                              PETSC_NULL);
+#endif
+
       }
     
                                      // then do the real work: set up solver
@@ -253,7 +260,6 @@ namespace PETScWrappers
 
 /* ---------------------- SolverRichardson ------------------------ */
 
-
   SolverRichardson::AdditionalData::
   AdditionalData (const double omega)
                   :
@@ -446,7 +452,7 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 */
                                      // so rather expand their macros by hand,
-                                     // and do some equally nast stuff that at
+                                     // and do some equally nasty stuff that at
                                      // least doesn't yield warnings...
     int (*fun_ptr)(KSP,int); 
     ierr = PetscObjectQueryFunction((PetscObject)(ksp),

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.