From: heister Date: Fri, 15 Feb 2013 05:10:00 +0000 (+0000) Subject: operator= automatically calls update_ghost_values() in PETSc. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c247296a881f7c4c3ad90113f1b9e5418ab6de8;p=dealii-svn.git operator= automatically calls update_ghost_values() in PETSc. git-svn-id: https://svn.dealii.org/trunk@28400 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 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; }