]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check whether construct_multigrid_hierarchy is set ealier. 15009/head
authorCe Qin <qince168@gmail.com>
Fri, 31 Mar 2023 12:08:30 +0000 (20:08 +0800)
committerCe Qin <qince168@gmail.com>
Fri, 31 Mar 2023 12:08:30 +0000 (20:08 +0800)
source/dofs/dof_handler_policy.cc

index 275c3d7094344d60bd47d2fe6d35f1f6b879b0f6..e7aab0bf17916e6a6dc4fe273deac9f1a7d5b799 100644 (file)
@@ -3034,6 +3034,12 @@ namespace internal
             &this->dof_handler->get_triangulation()));
         Assert(tr != nullptr, ExcInternalError());
 
+        AssertThrow((tr->is_multilevel_hierarchy_constructed()),
+                    ExcMessage(
+                      "Multigrid DoFs can only be distributed on a parallel "
+                      "Triangulation if the flag construct_multigrid_hierarchy "
+                      "is set in the constructor."));
+
         const unsigned int n_procs =
           Utilities::MPI::n_mpi_processes(tr->get_communicator());
         const unsigned int n_levels = tr->n_global_levels();

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.