]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix setting of update_ghost_values
authorPeter Munch <peterrmuench@gmail.com>
Sun, 22 Mar 2020 17:42:14 +0000 (18:42 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 22 Mar 2020 17:42:14 +0000 (18:42 +0100)
include/deal.II/lac/la_sm_vector.templates.h

index 7d6078b2c50ef686bdbd120d943bcfb166b871fd..18a938eda1f28c742c9ba392adfb5a84936464ac 100644 (file)
@@ -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;
     }
 
 

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.