From: young Date: Tue, 31 Mar 2009 13:17:37 +0000 (+0000) Subject: Upgraded: PETSc vector to migrate to PETSc 3.0.0 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d30fdb3eadf644235d53fdf6417bf900a328501;p=dealii-svn.git Upgraded: PETSc vector to migrate to PETSc 3.0.0 git-svn-id: https://svn.dealii.org/trunk@18537 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/petsc_vector.h b/deal.II/lac/include/lac/petsc_vector.h index eb5ce4f0d3..e56bdccb83 100644 --- a/deal.II/lac/include/lac/petsc_vector.h +++ b/deal.II/lac/include/lac/petsc_vector.h @@ -286,23 +286,25 @@ 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_SUBMINOR < 3)) + ierr = VecScatterBegin (static_cast(v), vector, + INSERT_VALUES, SCATTER_FORWARD, ctx); + AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = VecScatterEnd (static_cast(v), vector, + INSERT_VALUES, SCATTER_FORWARD, ctx); + +#else + ierr = VecScatterBegin (ctx,static_cast(v), vector, INSERT_VALUES, SCATTER_FORWARD); AssertThrow (ierr == 0, ExcPETScError(ierr)); ierr = VecScatterEnd (ctx, static_cast(v), vector, INSERT_VALUES, SCATTER_FORWARD); -#else - - ierr = VecScatterBegin (static_cast(v), vector, - INSERT_VALUES, SCATTER_FORWARD, ctx); - AssertThrow (ierr == 0, ExcPETScError(ierr)); - ierr = VecScatterEnd (static_cast(v), vector, - INSERT_VALUES, SCATTER_FORWARD, ctx); #endif AssertThrow (ierr == 0, ExcPETScError(ierr));