]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix bug in matrix-free operators regarding diagonal 14224/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Fri, 26 Aug 2022 14:16:34 +0000 (16:16 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Fri, 26 Aug 2022 14:16:34 +0000 (16:16 +0200)
include/deal.II/matrix_free/operators.h

index 1cc69cbde1b7d341acfd545e38f7bf56b82b269c..226ba886b3edde0b042a601fd19415725329fd10 100644 (file)
@@ -2382,7 +2382,8 @@ namespace MatrixFreeOperators
         VectorizedArrayType local_diagonal_vector[phi.static_dofs_per_cell];
         for (unsigned int i = 0; i < phi.dofs_per_component; ++i)
           {
-            for (unsigned int j = 0; j < phi.dofs_per_component; ++j)
+            for (unsigned int j = 0; j < phi.dofs_per_component * n_components;
+                 ++j)
               phi.begin_dof_values()[j] = VectorizedArrayType();
             phi.begin_dof_values()[i] = 1.;
             do_operation_on_cell(phi, cell);

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.