From 0249b754ef43ef40b1c2ba4a2ca46508d76f31df Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sun, 22 Mar 2020 18:42:14 +0100 Subject: [PATCH] Fix setting of update_ghost_values --- include/deal.II/lac/la_sm_vector.templates.h | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.39.5