]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Added changed interface for PETSc 2.3.3 vector scatters.
authorprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Jun 2007 11:47:19 +0000 (11:47 +0000)
committerprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 3 Jun 2007 11:47:19 +0000 (11:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@14744 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/petsc_vector.h

index 714d69c2ee7f9e3167b2503e458f4d7246482f99..2d02f3680164f27bab3b5164187a902fcd869a77 100644 (file)
@@ -283,13 +283,26 @@ namespace PETScWrappers
 
     ierr = VecScatterCreateToAll (static_cast<const Vec &>(v), &ctx, &vector);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
+    
+#if ((PETSC_VERSION_MAJOR >= 2) && \
+    (PETSC_VERSION_MINOR >=3) &&  \
+    (PETSC_VERSION_SUBMINOR >=3))
+
+    ierr = VecScatterBegin (ctx,static_cast<const Vec &>(v), vector,
+                            INSERT_VALUES, SCATTER_FORWARD);
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
 
+    ierr = VecScatterEnd (ctx, static_cast<const Vec &>(v), vector,
+                          INSERT_VALUES, SCATTER_FORWARD);
+#else
+    
     ierr = VecScatterBegin (static_cast<const Vec &>(v), vector,
                             INSERT_VALUES, SCATTER_FORWARD, ctx);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     ierr = VecScatterEnd (static_cast<const Vec &>(v), vector,
                           INSERT_VALUES, SCATTER_FORWARD, ctx);
+#endif        
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     ierr = VecScatterDestroy (ctx);

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.