]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve an error message. 13385/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 15 Feb 2022 03:40:58 +0000 (20:40 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 15 Feb 2022 03:40:58 +0000 (20:40 -0700)
include/deal.II/lac/petsc_vector_base.h

index cdc19ab169be03bae6e77575cbb2ddf2934346d3..b253095eb30cfa6af173ef99706f3f63d2ab30cc 100644 (file)
@@ -1254,7 +1254,14 @@ namespace PETScWrappers
 
             Assert(index >= static_cast<unsigned int>(begin) &&
                      index < static_cast<unsigned int>(end),
-                   ExcInternalError());
+                   ExcMessage("You are accessing elements of a vector without "
+                              "ghost elements that are not actually owned by "
+                              "this vector. A typical case where this may "
+                              "happen is if you are passing a non-ghosted "
+                              "(completely distributed) vector to a function "
+                              "that expects a vector that stores ghost "
+                              "elements for all locally relevant or locally "
+                              "active vector entries."));
 
             *(values_begin + i) = *(ptr + index - 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.