From 8cd6dbc0382845e5ddcc9d3ff661ff987be5b9a4 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Tue, 28 May 2013 07:05:33 +0000 Subject: [PATCH] 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 --- .../deal.II/lac/constraint_matrix.templates.h | 1 + deal.II/include/deal.II/lac/parallel_vector.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) 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 -- 2.39.5