From 131d9cce411c556de3ec0b74bd3f4122fe5f1590 Mon Sep 17 00:00:00 2001 From: Johannes Heinz Date: Fri, 9 Jun 2023 11:25:32 +0200 Subject: [PATCH] ensure distribute_local_to_global() is called with contiguous iterators --- include/deal.II/dofs/dof_accessor.templates.h | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.39.5