]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix out-of-range access with GLIBCXX_DEBUG.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 18 May 2018 13:13:47 +0000 (15:13 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 18 May 2018 13:13:47 +0000 (15:13 +0200)
include/deal.II/matrix_free/matrix_free.templates.h

index 5a53486862cceba2d28803441baef613e8b4343a..b70ca7b93fc1689c1e9367ec1fb0626884a01c85 100644 (file)
@@ -1174,7 +1174,8 @@ void MatrixFree<dim,Number>::initialize_indices
 
       std::vector<bool> hard_vectorization_boundary(task_info.face_partition_data.size(),
                                                     false);
-      if (task_info.scheme == internal::MatrixFreeFunctions::TaskInfo::none)
+      if (task_info.scheme == internal::MatrixFreeFunctions::TaskInfo::none &&
+          task_info.partition_row_index[2] < task_info.face_partition_data.size())
         hard_vectorization_boundary[task_info.partition_row_index[2]] = true;
       else
         for (unsigned int i=0; i<hard_vectorization_boundary.size(); ++i)

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.