From 054377dd2747ecdebcc39dcd7d4749733a894efd Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 15 Aug 2021 16:52:00 -0600 Subject: [PATCH] Improve error message. --- source/multigrid/mg_transfer_matrix_free.cc | 7 ++++--- source/multigrid/mg_transfer_prebuilt.cc | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/source/multigrid/mg_transfer_matrix_free.cc b/source/multigrid/mg_transfer_matrix_free.cc index e15f327f0e..7d06c3ce9b 100644 --- a/source/multigrid/mg_transfer_matrix_free.cc +++ b/source/multigrid/mg_transfer_matrix_free.cc @@ -101,9 +101,10 @@ MGTransferMatrixFree::build( { Assert(dof_handler.has_level_dofs(), ExcMessage( - "The underlying DoFHandler object did not call " - "distribute_mg_dofs(). This is a prerequisite for multigrid " - "transfers.")); + "The underlying DoFHandler object has not had its " + "distribute_mg_dofs() function called, but this is a prerequisite " + "for multigrid transfers. You will need to call this function, " + "probably close to where you already call distribute_dofs().")); this->fill_and_communicate_copy_indices(dof_handler); diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 30a6695d9f..e986774fac 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -154,9 +154,10 @@ MGTransferPrebuilt::build( { Assert(dof_handler.has_level_dofs(), ExcMessage( - "The underlying DoFHandler object did not call " - "distribute_mg_dofs(). This is a prerequisite for multigrid " - "transfers.")); + "The underlying DoFHandler object has not had its " + "distribute_mg_dofs() function called, but this is a prerequisite " + "for multigrid transfers. You will need to call this function, " + "probably close to where you already call distribute_dofs().")); const unsigned int n_levels = dof_handler.get_triangulation().n_global_levels(); -- 2.39.5