From: Maximilian Bergbauer Date: Fri, 5 Jan 2024 12:52:44 +0000 (+0100) Subject: Fix ecl cells X-Git-Tag: relicensing~162^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bf372571e3c87b1142ad7c05f7f07a82079ac18;p=dealii.git Fix ecl cells --- 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,