From: kronbichler Date: Tue, 28 May 2013 07:05:33 +0000 (+0000) Subject: Zero out ghosts in parallel vector explicitly when setting the constraints to zero... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4117b4f0e484e5cf99499e296478f2f38dfb7fd8;p=dealii-svn.git Zero out ghosts in parallel vector explicitly when setting the constraints to zero as they will be zeroed out anyway. git-svn-id: https://svn.dealii.org/trunk@29655 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/constraint_matrix.templates.h b/deal.II/include/deal.II/lac/constraint_matrix.templates.h index 3a67dbaf3f..0e69fc0847 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@ -753,6 +753,7 @@ namespace internal for (unsigned int i=0; i diff --git a/deal.II/include/deal.II/lac/parallel_vector.h b/deal.II/include/deal.II/lac/parallel_vector.h index 29d0b864b6..c752a9a6c7 100644 --- a/deal.II/include/deal.II/lac/parallel_vector.h +++ b/deal.II/include/deal.II/lac/parallel_vector.h @@ -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 inline IndexSet @@ -1470,6 +1478,16 @@ namespace parallel + template + inline + const IndexSet& + Vector::ghost_elements() const + { + return partitioner->ghost_indices(); + } + + + template inline bool