From 5568dec12b5476474a663c269163bac684fd9c7b Mon Sep 17 00:00:00 2001 From: Ce Qin Date: Fri, 31 Mar 2023 20:08:30 +0800 Subject: [PATCH] Check whether construct_multigrid_hierarchy is set ealier. --- source/dofs/dof_handler_policy.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 275c3d7094..e7aab0bf17 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -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(); -- 2.39.5