]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MatrixFree: Fix bug in setup of new cell_index for MG 14219/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 25 Aug 2022 07:26:02 +0000 (09:26 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 25 Aug 2022 07:26:02 +0000 (09:26 +0200)
include/deal.II/matrix_free/matrix_free.templates.h

index 4eef8291f0e793e765033b1353361b35a09c0868..e0272e9f8ea047b037a3e78f34e7b65c016bae7e 100644 (file)
@@ -869,7 +869,9 @@ MatrixFree<dim, Number, VectorizedArrayType>::internal_reinit(
 
     mf_cell_indices.resize((mg_level == numbers::invalid_unsigned_int) ?
                              tria.n_active_cells() :
-                             tria.n_cells(mg_level),
+                             (mg_level < tria.n_levels() ?
+                                tria.n_raw_cells(mg_level) :
+                                0),
                            numbers::invalid_unsigned_int);
 
     for (unsigned int cell = 0;

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.