]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix bug in access of dof indices without resolving constraints
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 26 Nov 2019 07:43:22 +0000 (08:43 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 26 Nov 2019 07:43:22 +0000 (08:43 +0100)
include/deal.II/matrix_free/matrix_free.templates.h

index 9738a7b6be73430d8c09ec2eefa3a657657179c9..1ed724377a10d4ddf89091035156bedf4ca89f12 100644 (file)
@@ -1547,8 +1547,14 @@ MatrixFree<dim, Number, VectorizedArrayType>::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(

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.