Assert(vec.n_blocks() > 0, ExcInternalError());
return vec.block(0).get_mpi_communicator();
}
+
+
+
+ template <typename V>
+ using is_compressed_op = decltype(std::declval<V>().is_compressed());
} // namespace AffineConstraints
} // namespace internal
+
template <typename number>
template <typename VectorType>
void
{
Assert(sorted == true, ExcMatrixNotClosed());
+ if constexpr (internal::is_supported_operation<
+ internal::AffineConstraints::is_compressed_op,
+ VectorType>)
+ Assert(
+ vec.is_compressed(),
+ ExcMessage(
+ "To distribute a parallel vector, the vector must "
+ "not contain any previously written-to or added-to entries that "
+ "have not already been sent to these entries' owners. But "
+ "the vector you passed in has such entries. You need to call "
+ "compress() on the vector first, before passing it to this function."));
+
// if the vector type supports parallel storage and if the vector actually
// does store only part of the vector, distributing is slightly more
// complicated. we might be able to skip the complicated part if one