From: heister Date: Tue, 19 Feb 2013 16:25:37 +0000 (+0000) Subject: deprecate update_ghost_values() X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4928f545016f490c5e711ce4e742068f25f2d1ec;p=dealii-svn.git deprecate update_ghost_values() git-svn-id: https://svn.dealii.org/trunk@28471 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/petsc_parallel_vector.h b/deal.II/include/deal.II/lac/petsc_parallel_vector.h index ed195adf15..16e8d97a0a 100644 --- a/deal.II/include/deal.II/lac/petsc_parallel_vector.h +++ b/deal.II/include/deal.II/lac/petsc_parallel_vector.h @@ -527,7 +527,14 @@ namespace PETScWrappers AssertThrow (ierr == 0, ExcPETScError(ierr)); if (has_ghost_elements()) - update_ghost_values(); + { + int ierr; + + ierr = VecGhostUpdateBegin(vector, INSERT_VALUES, SCATTER_FORWARD); + AssertThrow (ierr == 0, ExcPETScError(ierr)); + ierr = VecGhostUpdateEnd(vector, INSERT_VALUES, SCATTER_FORWARD); + AssertThrow (ierr == 0, ExcPETScError(ierr)); + } return *this; } diff --git a/deal.II/include/deal.II/lac/petsc_vector_base.h b/deal.II/include/deal.II/lac/petsc_vector_base.h index 07882b876a..b60b7e22dd 100644 --- a/deal.II/include/deal.II/lac/petsc_vector_base.h +++ b/deal.II/include/deal.II/lac/petsc_vector_base.h @@ -732,11 +732,12 @@ namespace PETScWrappers /** * Updates the ghost values of this - * vector. This is necessary after any - * modification before reading ghost - * values. + * vector. As ghosted vectors are now read-only and assignments + * from a non-ghosted vector update the ghost values automatically, + * this method does not need to be called in user code. + * @deprecated: calling this method is no longer necessary. */ - void update_ghost_values() const; + void update_ghost_values() const DEAL_II_DEPRECATED; /**