]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix ecl cells 16415/head
authorMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Fri, 5 Jan 2024 12:52:44 +0000 (13:52 +0100)
committerMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Fri, 5 Jan 2024 12:52:44 +0000 (13:52 +0100)
include/deal.II/matrix_free/fe_evaluation.h

index 6f42a6809d43d125c542b1fe92ec366273d4de0f..cf135ebd5430d6d8775a61736fe23633b22e5e47 100644 (file)
@@ -8468,8 +8468,23 @@ FEFaceEvaluation<dim,
     {
       this->face_orientations[0] = 0;
       this->face_numbers[0]      = face_number;
-      for (unsigned int i = 0; i < n_lanes; ++i)
-        this->cell_ids[i] = cell_index * n_lanes + i;
+      if (this->matrix_free->n_active_entries_per_cell_batch(this->cell) ==
+          n_lanes)
+        {
+          DEAL_II_OPENMP_SIMD_PRAGMA
+          for (unsigned int i = 0; i < n_lanes; ++i)
+            this->cell_ids[i] = cell_index * n_lanes + i;
+        }
+      else
+        {
+          unsigned int i = 0;
+          for (; i <
+                 this->matrix_free->n_active_entries_per_cell_batch(this->cell);
+               ++i)
+            this->cell_ids[i] = cell_index * n_lanes + i;
+          for (; i < n_lanes; ++i)
+            this->cell_ids[i] = numbers::invalid_unsigned_int;
+        }
       for (unsigned int i = 0; i < n_lanes; ++i)
         this->face_ids[i] =
           this->matrix_free->get_cell_and_face_to_plain_faces()(cell_index,

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.