From: Wolfgang Bangerth Date: Fri, 17 May 2024 02:22:06 +0000 (-0600) Subject: Provide an error message that is more meaningful for global MG transfer operator. X-Git-Tag: v9.6.0-rc1~257^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4243e59b13ab829558def91853a7615bbee88fe2;p=dealii.git Provide an error message that is more meaningful for global MG transfer operator. --- 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 099632b7ac..04918c3309 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -1438,13 +1438,21 @@ namespace internal dof_handler_fine.get_triangulation().create_cell_iterator( cell_id); - if (cell_fine->has_children() == false) + if (cell_fine->is_active()) { if (cell_fine->subdomain_id() != cell->subdomain_id()) flag = false; } else { + Assert( + cell_fine->child(0)->is_active(), + ExcMessage( + "In building a transfer operator, we are " + "expecting that a cell is not or at most once refined " + "on the other multigrid level. But it is refined more than once. " + "Are you trying to build a transfer operator across " + "more than one level of mesh refinement?")); if (cell_fine->child(0)->subdomain_id() != cell->subdomain_id()) flag = false;