]> https://gitweb.dealii.org/ - dealii.git/commitdiff
ensure distribute_local_to_global() is called with contiguous iterators 15334/head
authorJohannes Heinz <johannes.heinz@tuwien.ac.at>
Fri, 9 Jun 2023 09:25:32 +0000 (11:25 +0200)
committerJohannes Heinz <johannes.heinz@tuwien.ac.at>
Fri, 9 Jun 2023 09:25:32 +0000 (11:25 +0200)
include/deal.II/dofs/dof_accessor.templates.h

index f187b3eafb973df84acc5d4d2884007b5f9e559f..984ca09b25daaa26aff05a04d9beb2da4717044b 100644 (file)
@@ -2829,6 +2829,12 @@ DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
 
   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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.