From: Peter Munch Date: Sun, 22 Mar 2020 17:42:14 +0000 (+0100) Subject: Fix setting of update_ghost_values X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0249b754ef43ef40b1c2ba4a2ca46508d76f31df;p=dealii.git Fix setting of update_ghost_values --- diff --git a/include/deal.II/lac/la_sm_vector.templates.h b/include/deal.II/lac/la_sm_vector.templates.h index 7d6078b2c5..18a938eda1 100644 --- a/include/deal.II/lac/la_sm_vector.templates.h +++ b/include/deal.II/lac/la_sm_vector.templates.h @@ -475,6 +475,8 @@ namespace LinearAlgebra std::fill_n(data.values.get() + partitioner->local_size(), partitioner->n_ghost_indices(), Number()); + + vector_is_ghosted = false; } @@ -487,6 +489,8 @@ namespace LinearAlgebra { Assert(::dealii::VectorOperation::values::add == operation, ExcNotImplemented()); + Assert(vector_is_ghosted == false, + ExcMessage("Cannot call compress() on a ghosted vector")); partitioner_sm->compress_start(data.values.get(), data.others, communication_channel); @@ -501,6 +505,7 @@ namespace LinearAlgebra { Assert(::dealii::VectorOperation::values::add == operation, ExcNotImplemented()); + vector_is_ghosted = false; partitioner_sm->compress_finish(data.values.get(), data.others); } @@ -524,6 +529,7 @@ namespace LinearAlgebra { partitioner_sm->update_ghost_values_finish(data.values.get(), data.others); + vector_is_ghosted = true; }