From 3d30fdb3eadf644235d53fdf6417bf900a328501 Mon Sep 17 00:00:00 2001 From: young Date: Tue, 31 Mar 2009 13:17:37 +0000 Subject: [PATCH] Upgraded: PETSc vector to migrate to PETSc 3.0.0 git-svn-id: https://svn.dealii.org/trunk@18537 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/petsc_vector.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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)); -- 2.39.5