From 3c247296a881f7c4c3ad90113f1b9e5418ab6de8 Mon Sep 17 00:00:00 2001 From: heister Date: Fri, 15 Feb 2013 05:10:00 +0000 Subject: [PATCH] operator= automatically calls update_ghost_values() in PETSc. git-svn-id: https://svn.dealii.org/trunk@28400 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/lac/petsc_parallel_vector.h | 2 ++ deal.II/source/lac/petsc_parallel_vector.cc | 2 ++ 2 files changed, 4 insertions(+) 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 bea148060f..7fe5a5633a 100644 --- a/deal.II/include/deal.II/lac/petsc_parallel_vector.h +++ b/deal.II/include/deal.II/lac/petsc_parallel_vector.h @@ -509,6 +509,8 @@ namespace PETScWrappers const int ierr = VecCopy (v.vector, vector); AssertThrow (ierr == 0, ExcPETScError(ierr)); + if (has_ghost_elements()) + update_ghost_values(); return *this; } diff --git a/deal.II/source/lac/petsc_parallel_vector.cc b/deal.II/source/lac/petsc_parallel_vector.cc index d0b3b27923..e2302f37b8 100644 --- a/deal.II/source/lac/petsc_parallel_vector.cc +++ b/deal.II/source/lac/petsc_parallel_vector.cc @@ -197,6 +197,8 @@ namespace PETScWrappers ierr = VecRestoreArray (static_cast(v), &src_array); AssertThrow (ierr == 0, ExcPETScError(ierr)); + if (has_ghost_elements()) + update_ghost_values(); return *this; } -- 2.39.5