From: Johannes Heinz Date: Fri, 9 Jun 2023 09:25:32 +0000 (+0200) Subject: ensure distribute_local_to_global() is called with contiguous iterators X-Git-Tag: v9.5.0-rc1~135^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=131d9cce411c556de3ec0b74bd3f4122fe5f1590;p=dealii.git ensure distribute_local_to_global() is called with contiguous iterators --- diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index f187b3eafb..984ca09b25 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -2829,6 +2829,12 @@ DoFCellAccessor:: Assert(!this->has_children(), ExcMessage("Cell must be active")); + Assert( + internal::ArrayViewHelper::is_contiguous(local_source_begin, + local_source_end), + ExcMessage( + "This function can not be called with iterator types that do not point to contiguous memory.")); + const unsigned int n_dofs = local_source_end - local_source_begin; internal::DoFAccessorImplementation::Implementation::dof_index_vector_type