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;
}
/**
* 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;
/**
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams