]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Global coarsening: reset ghost state of internal vectors 12798/head
authorPeter Munch <peterrmuench@gmail.com>
Thu, 7 Oct 2021 12:39:39 +0000 (14:39 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Fri, 8 Oct 2021 06:30:00 +0000 (08:30 +0200)
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h

index 71c38856ef954193670391ff4fa684a13debaf0f..d0a9fa7164fc4f4fd67e7ae859c76127f07ee945 100644 (file)
@@ -2560,6 +2560,12 @@ MGTwoLevelTransfer<dim, LinearAlgebra::distributed::Vector<Number>>::
         }
     }
 
+  // clean up related to update_ghost_values()
+  if (use_src_inplace == false)
+    vec_fine_ptr->set_ghost_state(false); // internal vector
+  else if (fine_element_is_continuous)
+    vec_fine_ptr->zero_out_ghost_values(); // external vector
+
   this->vec_coarse.compress(VectorOperation::add);
 
   dst.copy_locally_owned_data_from(this->vec_coarse);
@@ -2669,6 +2675,12 @@ MGTwoLevelTransfer<dim, LinearAlgebra::distributed::Vector<Number>>::
         }
     }
 
+  // clean up related to update_ghost_values()
+  if (use_src_inplace == false)
+    vec_fine_ptr->set_ghost_state(false); // internal vector
+  else if (fine_element_is_continuous)
+    vec_fine_ptr->zero_out_ghost_values(); // external vector
+
   dst.copy_locally_owned_data_from(this->vec_coarse);
 }
 

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.