]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide an error message that is more meaningful for global MG transfer operator. 17036/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 17 May 2024 02:22:06 +0000 (20:22 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 17 May 2024 02:22:06 +0000 (20:22 -0600)
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h

index 099632b7ac550283157d46c034db5991ffb2cbc6..04918c3309c7dd4bc44fe9782a20b156bdc8bbeb 100644 (file)
@@ -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;

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.