From a454062ff5d56d3b3f18a35807f15bd4ba1951ae Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 2 Feb 2015 21:44:32 -0600 Subject: [PATCH] Remove deprecated function PETScWrappers::VectorBase::update_ghost_values. --- doc/news/changes.h | 3 ++- include/deal.II/lac/petsc_vector_base.h | 10 ---------- source/lac/petsc_parallel_vector.cc | 7 ++++++- source/lac/petsc_vector_base.cc | 19 ------------------- tests/mpi/ghost_01.cc | 1 - tests/petsc/copy_to_dealvec.cc | 1 - 6 files changed, 8 insertions(+), 33 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index 0a3a1b3952..7a1a89e60e 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -170,7 +170,8 @@ inconvenience this causes. function that takes a scalar as argument. - PreconditionBlock::size. - Classes PreconditionedMatrix and PreconditionLACSolver. - - PETScVectors::MPI::Vector constructors and reinit() variants. + - PETScWrappers::VectorBase::update_ghost_values. + - PETScWrappers::MPI::Vector constructors and reinit variants. - SparseMatrixIterators::Accessor and SparseMatrixIterators::Iterator constructors. - SparseMatrix::raw_entry. diff --git a/include/deal.II/lac/petsc_vector_base.h b/include/deal.II/lac/petsc_vector_base.h index 92ff40e759..56c4286f8e 100644 --- a/include/deal.II/lac/petsc_vector_base.h +++ b/include/deal.II/lac/petsc_vector_base.h @@ -660,16 +660,6 @@ namespace PETScWrappers void ratio (const VectorBase &a, const VectorBase &b); - /** - * Updates the ghost values of this 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 DEAL_II_DEPRECATED; - - /** * Prints the PETSc vector object values using PETSc internal vector * viewer function VecView. The default format prints the diff --git a/source/lac/petsc_parallel_vector.cc b/source/lac/petsc_parallel_vector.cc index 301f7c0e16..cd9155941a 100644 --- a/source/lac/petsc_parallel_vector.cc +++ b/source/lac/petsc_parallel_vector.cc @@ -237,7 +237,12 @@ namespace PETScWrappers AssertThrow (ierr == 0, ExcPETScError(ierr)); if (has_ghost_elements()) - update_ghost_values(); + { + 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/source/lac/petsc_vector_base.cc b/source/lac/petsc_vector_base.cc index a0ca931815..a3ee01e88d 100644 --- a/source/lac/petsc_vector_base.cc +++ b/source/lac/petsc_vector_base.cc @@ -1152,25 +1152,6 @@ namespace PETScWrappers last_action = action; } - - void - VectorBase::update_ghost_values() const - { - // generate an error for not ghosted - // vectors - if (!ghosted) - AssertThrow (false, ExcInternalError()); - - 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)); - } - - - } DEAL_II_NAMESPACE_CLOSE diff --git a/tests/mpi/ghost_01.cc b/tests/mpi/ghost_01.cc index 5b722aa7c7..82037279cc 100644 --- a/tests/mpi/ghost_01.cc +++ b/tests/mpi/ghost_01.cc @@ -52,7 +52,6 @@ void test () vb.compress(VectorOperation::insert); vb*=2.0; v=vb; - //v.update_ghost_values(); Assert(!vb.has_ghost_elements(), ExcInternalError()); Assert(v.has_ghost_elements(), ExcInternalError()); diff --git a/tests/petsc/copy_to_dealvec.cc b/tests/petsc/copy_to_dealvec.cc index 2fbc88f366..ec922fd49f 100644 --- a/tests/petsc/copy_to_dealvec.cc +++ b/tests/petsc/copy_to_dealvec.cc @@ -55,7 +55,6 @@ void test () vb.compress(VectorOperation::insert); vb*=2.0; v=vb; - //v.update_ghost_values(); Assert(!vb.has_ghost_elements(), ExcInternalError()); Assert(v.has_ghost_elements(), ExcInternalError()); -- 2.39.5