]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Zero out ghosts in parallel vector explicitly when setting the constraints to zero...
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 May 2013 07:05:33 +0000 (07:05 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 May 2013 07:05:33 +0000 (07:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@29655 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/constraint_matrix.templates.h
deal.II/include/deal.II/lac/parallel_vector.h

index 3a67dbaf3f6453b229aad13cd299b57889aadf28..0e69fc084763cb386f6684f308c5fc65de20ced3 100644 (file)
@@ -753,6 +753,7 @@ namespace internal
         for (unsigned int i=0; i<vec.local_size(); ++i)
           if (cm.is_constrained (shift + vec.local_range().first+i))
             vec.local_element(i) = 0;
+        vec.zero_out_ghosts();
       }
 
       template<class VEC>
index 29d0b864b6b1273b459fd0e9fc5fdce252bd117b..c752a9a6c727b06e64c1420e351807e05b9fe481 100644 (file)
@@ -479,6 +479,13 @@ namespace parallel
        */
       unsigned int n_ghost_entries () const;
 
+      /**
+       * Return an index set that describes which elements of this vector are
+       * not owned by the current processor but can be written into or read
+       * from locally (ghost elements).
+       */
+      const IndexSet& ghost_elements() const;
+
       /**
        * Returns whether the given global index is a ghost index on the
        * present processor. Returns false for indices that are owned locally
@@ -1445,6 +1452,7 @@ namespace parallel
     }
 
 
+
     template <typename Number>
     inline
     IndexSet
@@ -1470,6 +1478,16 @@ namespace parallel
 
 
 
+    template <typename Number>
+    inline
+    const IndexSet&
+    Vector<Number>::ghost_elements() const
+    {
+      return partitioner->ghost_indices();
+    }
+
+
+
     template <typename Number>
     inline
     bool

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.