From: Martin Kronbichler Date: Thu, 25 Aug 2022 07:26:02 +0000 (+0200) Subject: MatrixFree: Fix bug in setup of new cell_index for MG X-Git-Tag: v9.5.0-rc1~1017^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14219%2Fhead;p=dealii.git MatrixFree: Fix bug in setup of new cell_index for MG --- diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 4eef8291f0..e0272e9f8e 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -869,7 +869,9 @@ MatrixFree::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;