From: Wolfgang Bangerth Date: Wed, 7 Aug 2024 20:38:45 +0000 (-0600) Subject: Improve an error message. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15aab2b1c42d18dea11f2b11dd77e8742fc00539;p=dealii.git Improve an error message. --- diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index f1b4738613..93702dbce2 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -436,7 +436,14 @@ namespace internal Assert(fe_index_local_ptr != dof_handler.hp_object_fe_indices[structdim].begin() + dof_handler.hp_object_fe_ptr[structdim][obj_index + 1], - ExcMessage("Call distribute_dofs() first.")); + ExcMessage( + "You tried to call a function accessing DoF indices, but " + "they appear not be available (yet) or inconsistent. " + "Did you call distribute_dofs() first? Alternatively, if " + "you are using different elements on different cells (i.e., " + "you are using the hp capabilities of deal.II), did you " + "change the active_fe_index of a cell since you last " + "called distribute_dofs()?")); const types::fe_index fe_index_local = std::distance(dof_handler.hp_object_fe_indices[structdim].begin() +