]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Apply patch 18761 here as well (Make compile again with PETSc 2.3.x.). How embarrassi...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 Apr 2009 03:37:49 +0000 (03:37 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 Apr 2009 03:37:49 +0000 (03:37 +0000)
git-svn-id: https://svn.dealii.org/branches/releases/Branch-6-2@18762 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/petsc_vector.h
deal.II/lac/source/petsc_matrix_base.cc
deal.II/lac/source/petsc_precondition.cc

index 2698d68cc4198667b52754e7d0f5748e2b9e65d9..16721ee3410bb1727ef2b74924745c6b002b99c1 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
+//    Copyright (C) 2004, 2005, 2006, 2007, 2009 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -286,9 +286,9 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
     
 #if ((PETSC_VERSION_MAJOR == 2) && \
-    (PETSC_VERSION_MINOR < 3) &&  \
-    (PETSC_VERSION_SUBMINOR < 3))
-
+     ((PETSC_VERSION_MINOR < 3) || \
+      ((PETSC_VERSION_MINOR == 3) &&           \
+       (PETSC_VERSION_SUBMINOR < 3))))
     ierr = VecScatterBegin (static_cast<const Vec &>(v), vector,
                             INSERT_VALUES, SCATTER_FORWARD, ctx);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
index 9de9116a0f5ed591c8caa2187ab4fe4e269504ed..b6d27f86481430955f9441724210437dc9540713 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004, 2005, 2006, 2008 by the deal.II authors
+//    Copyright (C) 2004, 2005, 2006, 2008, 2009 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -553,10 +553,13 @@ namespace PETScWrappers
   MatrixBase::is_hermitian (const double tolerance) 
   {
     PetscTruth truth;
-                                       // First flush PETSc caches
+                                    // First flush PETSc caches
     compress ();
 
-#if (PETSC_VERSION_MAJOR <= 2) 
+#if (PETSC_VERSION_MAJOR <= 2)
+                                    // avoid warning about unused variables
+    (void) tolerance;
+    
     MatIsHermitian (matrix, &truth);
 #else
     MatIsHermitian (matrix, tolerance, &truth);
index 88213a8a8c83f81279ae4dd51db3772ab5d52a8a..d8ea360c72221814dc72031db45775a7af1b0d57 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004, 2006, 2008 by the deal.II authors
+//    Copyright (C) 2004, 2006, 2008, 2009 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -234,7 +234,10 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // then set flags
-#if (PETSC_VERSION_MAJOR == 2) && (PETSC_VERSION_MINOR < 3) && (PETSC_VERSION_SUBMINOR < 1)
+#if ((PETSC_VERSION_MAJOR == 2) && \
+     ((PETSC_VERSION_MINOR < 3) || \
+      ((PETSC_VERSION_MINOR == 3) && \
+       (PETSC_VERSION_SUBMINOR < 1))))
     PCICCSetLevels (pc, additional_data.levels);
 #else
     PCFactorSetLevels (pc, additional_data.levels);
@@ -274,7 +277,10 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // then set flags
-#if (PETSC_VERSION_MAJOR == 2) && (PETSC_VERSION_MINOR < 3) && (PETSC_VERSION_SUBMINOR < 1)
+#if ((PETSC_VERSION_MAJOR == 2) && \
+     ((PETSC_VERSION_MINOR < 3) || \
+      ((PETSC_VERSION_MINOR == 3) && \
+       (PETSC_VERSION_SUBMINOR < 1))))
     PCILUSetLevels (pc, additional_data.levels);  
 #else
     PCFactorSetLevels (pc, additional_data.levels);
@@ -318,7 +324,10 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // set flags as given
-#if (PETSC_VERSION_MAJOR == 2) && (PETSC_VERSION_MINOR >= 3) && (PETSC_VERSION_SUBMINOR >= 1)
+#if ((PETSC_VERSION_MAJOR == 2) && \
+     ((PETSC_VERSION_MINOR < 3) || \
+      ((PETSC_VERSION_MINOR == 3) && \
+       (PETSC_VERSION_SUBMINOR < 1))))
     ierr = PCLUSetPivoting (pc, additional_data.pivoting);
 #else
     ierr = PCFactorSetPivoting (pc, additional_data.pivoting);

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.