From: Martin Kronbichler Date: Tue, 26 Nov 2019 07:43:22 +0000 (+0100) Subject: Fix bug in access of dof indices without resolving constraints X-Git-Tag: v9.2.0-rc1~837^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d98910397d6eeaee18172290c46e5966ef94d03;p=dealii.git Fix bug in access of dof indices without resolving constraints --- diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 9738a7b6be..1ed724377a 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -1547,8 +1547,14 @@ MatrixFree::initialize_indices( ghost_indices.push_back( part.local_to_global(di.dof_indices[i])); + const unsigned int fe_index = di.dofs_per_cell.size() == 1 ? + 0 : + di.cell_active_fe_index[cell]; + const unsigned int dofs_this_cell = + di.dofs_per_cell[fe_index]; + for (unsigned int i = di.row_starts_plain_indices[cell]; - i < di.row_starts_plain_indices[cell + 1]; + i < di.row_starts_plain_indices[cell] + dofs_this_cell; ++i) if (di.plain_dof_indices[i] >= part.local_size()) ghost_indices.push_back(