]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Upgrade PETSc vectors to petsc-dev
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Sep 2011 08:23:07 +0000 (08:23 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Sep 2011 08:23:07 +0000 (08:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@24257 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/petsc_vector.h
deal.II/source/lac/petsc_parallel_vector.cc
deal.II/source/lac/petsc_vector.cc
deal.II/source/lac/petsc_vector_base.cc

index f04ae3a316fcc0aac5227bebf4854c7c07b89011..98ca66313dbcf4f4d2340d9678021eab8736e1dc 100644 (file)
@@ -283,7 +283,11 @@ namespace PETScWrappers
                                      // the petsc function we call wants to
                                      // generate the vector itself, so destroy
                                      // the old one first
+#if DEAL_II_PETSC_VERSION_DEV()
+       ierr = VecDestroy (&vector);
+#else
        ierr = VecDestroy (vector);
+#endif
        AssertThrow (ierr == 0, ExcPETScError(ierr));
       }
 
@@ -331,7 +335,11 @@ namespace PETScWrappers
 #endif        
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
+#if DEAL_II_PETSC_VERSION_DEV()
+    ierr = VecScatterDestroy (&ctx);
+#else
     ierr = VecScatterDestroy (ctx);
+#endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 #endif
     
index 7a8968acf347b48702799cd25f513abd87fa2db3..04a6cb75b9d56b4509bfb1046339fdac5d411b61 100644 (file)
@@ -113,7 +113,12 @@ namespace PETScWrappers
 
                                            // so let's go the slow way:
           int ierr;
+#if DEAL_II_PETSC_VERSION_DEV()
+          ierr = VecDestroy (&vector);
+#else
           ierr = VecDestroy (vector);
+#endif
+
           AssertThrow (ierr == 0, ExcPETScError(ierr));
 
           create_vector (n, local_sz);
index 8ad073ad80dfb11f35629973e3dffcc710bcb406..4ea59af9d474c6a2b60bf475fa54e39680da76db 100644 (file)
@@ -78,7 +78,11 @@ namespace PETScWrappers
                                          // so let's go the slow way:
        if (attained_ownership)
          {
+#if DEAL_II_PETSC_VERSION_DEV()
+           int ierr = VecDestroy (&vector);
+#else
            int ierr = VecDestroy (vector);
+#endif
            AssertThrow (ierr == 0, ExcPETScError(ierr));
          }
 
index a2ba8446730bf047d3e7ffc520abbc0d738d9f47..130bb33b2f64ecbc6c1ae9d012ae7a11bea662a7 100644 (file)
@@ -215,7 +215,11 @@ namespace PETScWrappers
   {
     if (attained_ownership)
       {        
+#if DEAL_II_PETSC_VERSION_DEV()
+       const int ierr = VecDestroy (&vector);
+#else
        const int ierr = VecDestroy (vector);
+#endif
        AssertThrow (ierr == 0, ExcPETScError(ierr));
       }
   }
@@ -253,7 +257,12 @@ namespace PETScWrappers
     Assert (size() == v.size(),
             ExcDimensionMismatch(size(), v.size()));
 
-    PetscTruth flag;
+#if DEAL_II_PETSC_VERSION_DEV()
+    PetscBool 
+#else
+    PetscTruth 
+#endif
+      flag;
 
     const int ierr = VecEqual (vector, v.vector, &flag);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
@@ -269,7 +278,12 @@ namespace PETScWrappers
     Assert (size() == v.size(),
             ExcDimensionMismatch(size(), v.size()));
 
-    PetscTruth flag;
+#if DEAL_II_PETSC_VERSION_DEV()
+    PetscBool 
+#else
+    PetscTruth 
+#endif
+      flag;
 
     const int ierr = VecEqual (vector, v.vector, &flag);
     AssertThrow (ierr == 0, ExcPETScError(ierr));

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.