]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Change assert 16318/head
authorMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Fri, 1 Dec 2023 22:57:13 +0000 (23:57 +0100)
committerMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Fri, 1 Dec 2023 22:57:13 +0000 (23:57 +0100)
include/deal.II/matrix_free/matrix_free.templates.h

index 2477979744913cb15f88ab735ca2e7d92e8c753a..c7bf9a972ee6740e4b84259b4ede41108c87183e 100644 (file)
@@ -308,9 +308,6 @@ MatrixFree<dim, Number, VectorizedArrayType>::get_face_iterator(
   const unsigned int fe_component) const
 {
   AssertIndexRange(fe_component, dof_handlers.size());
-  AssertIndexRange(face_batch_index,
-                   n_inner_face_batches() +
-                     (interior ? n_boundary_face_batches() : 0));
 
   AssertIndexRange(lane_index,
                    n_active_entries_per_face_batch(face_batch_index));
@@ -323,6 +320,11 @@ MatrixFree<dim, Number, VectorizedArrayType>::get_face_iterator(
                                     face2cell_info.cells_interior[lane_index] :
                                     face2cell_info.cells_exterior[lane_index];
 
+  Assert(cell_index != numbers::invalid_unsigned_int,
+         ExcMessage(
+           "Invalid cell index for requested face. Exterior cells cannot be"
+           " accessed on boundaries."));
+
   std::pair<unsigned int, unsigned int> index = cell_level_index[cell_index];
 
   return {typename DoFHandler<dim>::cell_iterator(

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.