// nothing to do for insert (only need to zero ghost entries in
// compress_finish(). in debug mode we still want to check consistency
// of the inserted data, therefore the communication is still
- // initialized
+ // initialized. Having different code in debug and optimized mode is
+ // somewhat dangerous, but it really saves communication so it seems
+ // still worthwhile.
#ifndef DEBUG
if (operation == VectorOperation::insert)
return;
{
#ifdef DEAL_II_WITH_MPI
+ // in optimized mode, no communication was started, so leave the
+ // function directly (and only clear ghosts)
+#ifndef DEBUG
+ if (operation == VectorOperation::insert)
+ {
+ zero_out_ghosts();
+ return;
+ }
+#endif
+
const Utilities::MPI::Partitioner &part = *partitioner;
// nothing to do when we neither have import
j++, read_position++)
Assert(*read_position == 0. ||
std::abs(local_element(j) - *read_position) <
- std::abs(local_element(j)) * 100. *
+ std::abs(local_element(j)) * 1000. *
std::numeric_limits<Number>::epsilon(),
ExcMessage("Inserted elements do not match."));
AssertDimension(read_position-import_data,part.n_import_indices());