From: Sebastian Proell Date: Sun, 11 Jun 2023 12:36:45 +0000 (+0200) Subject: Fix FE_Nothing in global coarsening p-transfer X-Git-Tag: v9.5.0-rc1~107^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15340%2Fhead;p=dealii.git Fix FE_Nothing in global coarsening p-transfer --- diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index e006b130fd..f2c77c7d51 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -2673,8 +2673,13 @@ MGTwoLevelTransfer>:: (scheme.prolongation_matrix.size() == 0 && scheme.prolongation_matrix_1d.size() == 0) == false; - evaluation_data_fine.resize(scheme.n_dofs_per_cell_fine); - evaluation_data_coarse.resize(scheme.n_dofs_per_cell_fine); + evaluation_data_fine.clear(); + evaluation_data_coarse.clear(); + + const unsigned int max_n_dofs_per_cell = + std::max(scheme.n_dofs_per_cell_fine, scheme.n_dofs_per_cell_coarse); + evaluation_data_fine.resize(max_n_dofs_per_cell); + evaluation_data_coarse.resize(max_n_dofs_per_cell); CellTransferFactory cell_transfer(scheme.degree_fine, scheme.degree_coarse); @@ -2844,8 +2849,13 @@ MGTwoLevelTransfer>:: (scheme.prolongation_matrix.size() == 0 && scheme.prolongation_matrix_1d.size() == 0) == false; - evaluation_data_fine.resize(scheme.n_dofs_per_cell_fine); - evaluation_data_coarse.resize(scheme.n_dofs_per_cell_fine); + evaluation_data_fine.clear(); + evaluation_data_coarse.clear(); + + const unsigned int max_n_dofs_per_cell = + std::max(scheme.n_dofs_per_cell_fine, scheme.n_dofs_per_cell_coarse); + evaluation_data_fine.resize(max_n_dofs_per_cell); + evaluation_data_coarse.resize(max_n_dofs_per_cell); CellTransferFactory cell_transfer(scheme.degree_fine, scheme.degree_coarse);