From 2f3a0b99aba4e5bc6dfbceac14da8b2ffc24a564 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sun, 5 Jan 2020 17:37:55 +0100 Subject: [PATCH] Fix two bugs in matrix-free code --- include/deal.II/matrix_free/fe_evaluation.h | 4 ++-- include/deal.II/matrix_free/mapping_info.templates.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index c6e2604582..b2c1182e24 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -7417,11 +7417,11 @@ FEFaceEvaluationjacobian = &this->matrix_info->get_mapping_info() .face_data_by_cells[this->quad_no] - .jacobians[!this->is_minus_face][offsets]; + .jacobians[!this->is_interior_face][offsets]; this->normal_x_jacobian = &this->matrix_info->get_mapping_info() .face_data_by_cells[this->quad_no] - .normals_times_jacobians[!this->is_minus_face][offsets]; + .normals_times_jacobians[!this->is_interior_face][offsets]; # ifdef DEBUG this->dof_values_initialized = false; diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index e7357c76bb..9d8d568229 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -2049,7 +2049,9 @@ namespace internal fe_val.reinit(cell_it, face); const bool is_local = - cell_it->is_locally_owned() && + (cell_it->active() ? + cell_it->is_locally_owned() : + cell_it->is_locally_owned_on_level()) && (!cell_it->at_boundary(face) || (cell_it->at_boundary(face) && cell_it->has_periodic_neighbor(face))); -- 2.39.5