]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
deprecate update_ghost_values()
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Feb 2013 16:25:37 +0000 (16:25 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Feb 2013 16:25:37 +0000 (16:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@28471 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/petsc_parallel_vector.h
deal.II/include/deal.II/lac/petsc_vector_base.h

index ed195adf15e3e768f7b92d63faf312d612c2054b..16e8d97a0a4c89486c872aa91325adedc3e41f2d 100644 (file)
@@ -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;
     }
 
index 07882b876a42bafbb8e861592f5c6d3e5ec68b9c..b60b7e22dd10ca3ed5cc04175c39d7822e3d3ae8 100644 (file)
@@ -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;
 
 
     /**

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


Typeset in Trocchi and Trocchi Bold Sans Serif.