Skip to content

Commit

Permalink
Zero out ghosts
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrum committed Dec 1, 2023
1 parent 4c0c3cd commit 15fbca8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/deal.II/multigrid/mg_transfer_matrix_free.h
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,8 @@ MGTransferMatrixFree<dim, Number>::interpolate_to_mg(

auto &dst_level = dst[l];

dst_level.zero_out_ghost_values();

const auto copy_unknowns = [&](const auto &indices) {
for (unsigned int i = 0; i < indices.n_cols(); ++i)
dst_level.local_element(indices(1, i)) =
Expand Down
6 changes: 6 additions & 0 deletions tests/multigrid/mg_data_out_04.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ do_test()
transfer.build(dof_handler);
transfer.interpolate_to_mg(dof_handler, dof_vector, global_dof_vector);

for (unsigned int i = dof_vector.min_level(); i <= dof_vector.max_level();
++i)
dof_vector[i].update_ghost_values();

transfer.interpolate_to_mg(dof_handler, dof_vector, global_dof_vector);

for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
{
Expand Down

0 comments on commit 15fbca8

Please sign in to comment.