From 6bf372571e3c87b1142ad7c05f7f07a82079ac18 Mon Sep 17 00:00:00 2001 From: Maximilian Bergbauer Date: Fri, 5 Jan 2024 13:52:44 +0100 Subject: [PATCH] Fix ecl cells --- include/deal.II/matrix_free/fe_evaluation.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 6f42a6809d..cf135ebd54 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -8468,8 +8468,23 @@ FEFaceEvaluationface_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, -- 2.39.5