]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve an error message. 17449/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 7 Aug 2024 20:38:45 +0000 (14:38 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 7 Aug 2024 20:38:45 +0000 (14:38 -0600)
include/deal.II/dofs/dof_accessor.templates.h

index f1b4738613e8c32cb679c857c3c8909f6ec98ec1..93702dbce2a3aa602c590d1887b598ec7c98be47 100644 (file)
@@ -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() +

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.