From 047c2fb018b275332ca5489baa6ef665a2e5915e Mon Sep 17 00:00:00 2001 From: Maximilian Bergbauer Date: Tue, 9 Nov 2021 14:37:57 +0100 Subject: [PATCH] Select correct code path for neighbor elements --- include/deal.II/matrix_free/fe_evaluation.h | 23 +++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index d2961eaebb..75e7f55842 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -444,7 +444,9 @@ protected: /** * Flag holding information whether a face is an interior or exterior face - * according to the defined direction of the normal. Not used for cells. + * according to the defined direction of the normal. For cells it defines if + * the dof values should be read from the actual cell corresponding to the + * interior face or the neighboring cell corresponding to the exterior face. */ bool is_interior_face; @@ -3964,10 +3966,11 @@ FEEvaluationBaseData:: for (unsigned int i = 0; i < v_len; ++i) cells[i] = numbers::invalid_unsigned_int; - if (is_face && - this->dof_access_index == - internal::MatrixFreeFunctions::DoFInfo::dof_access_cell && - this->is_interior_face == false) + if ((is_face && + this->dof_access_index == + internal::MatrixFreeFunctions::DoFInfo::dof_access_cell && + this->is_interior_face == false) || + (!is_face && !this->is_interior_face)) { // cell-based face-loop: plus face for (unsigned int i = 0; i < v_len; ++i) @@ -4929,7 +4932,8 @@ FEEvaluationBase:: !(is_face && this->dof_access_index == internal::MatrixFreeFunctions::DoFInfo::dof_access_cell && - this->is_interior_face == false)) + this->is_interior_face == false) && + !(!is_face && !this->is_interior_face)) { const unsigned int dof_index = dof_indices_cont[this->cell * VectorizedArrayType::size()] + @@ -4963,9 +4967,10 @@ FEEvaluationBase:: this->dof_info->n_vectorization_lanes_filled[ind][this->cell]; const bool is_ecl = - this->dof_access_index == - internal::MatrixFreeFunctions::DoFInfo::dof_access_cell && - this->is_interior_face == false; + (this->dof_access_index == + internal::MatrixFreeFunctions::DoFInfo::dof_access_cell && + this->is_interior_face == false) || + (!is_face && !this->is_interior_face); if (vectors_sm[0] != nullptr) { -- 2.39.5