// clear the ghost array in case we did not yet do that in the _start
// function
- if (n_ghost_indices_in_larger_set == n_ghost_indices() ||
- ghost_array.size() != n_ghost_indices_in_larger_set)
- std::memset(ghost_array.begin(), 0, sizeof(Number)*n_ghost_indices());
+ std::memset(ghost_array.begin(), 0, sizeof(Number)*n_ghost_indices());
// clear the compress requests
requests.resize(0);
temp_array.size()),
make_array_view(locally_owned_array),
make_array_view(ghosts), requests);
+ // check that the ghost entries are zeroed out in these calls
+ for (unsigned int i=0; i<v.n_ghost_indices(); ++i)
+ AssertDimension(ghosts[i], 0);
}
deallog << "From all ghosts: ";
for (unsigned int i=0; i<locally_owned_array.size(); ++i)
temp_array.size()),
make_array_view(locally_owned_array),
make_array_view(ghosts), requests);
+
+ // check that the ghost entries are zeroed out in these calls
+ for (unsigned int i=0; i<w.n_ghost_indices(); ++i)
+ AssertDimension(ghosts[i], 0);
}
deallog << "From reduced ghosts 1: ";
for (unsigned int i=0; i<locally_owned_array.size(); ++i)
temp_array.size()),
make_array_view(locally_owned_array),
make_array_view(ghosts), requests);
+
+ // check that the ghost entries are zeroed out in these calls
+ for (unsigned int i=0; i<x.n_ghost_indices(); ++i)
+ AssertDimension(ghosts[i], 0);
}
deallog << "From reduced ghosts 2: ";
for (unsigned int i=0; i<locally_owned_array.size(); ++i)