]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Consistent local range error message 11554/head
authorSebastian Proell <proell@lnm.mw.tum.de>
Fri, 15 Jan 2021 11:04:18 +0000 (12:04 +0100)
committerSebastian Proell <proell@lnm.mw.tum.de>
Fri, 15 Jan 2021 16:14:39 +0000 (17:14 +0100)
include/deal.II/lac/la_parallel_vector.h
include/deal.II/lac/petsc_vector_base.h
include/deal.II/lac/trilinos_sparse_matrix.h
include/deal.II/lac/trilinos_sparsity_pattern.h
include/deal.II/lac/trilinos_vector.h
source/lac/trilinos_sparse_matrix.cc

index 0b23cc11dddbb64c8613e205eaf8eff748fd9259..90aba609998e65a5fc85511523c839238e8f2ec0 100644 (file)
@@ -1218,8 +1218,8 @@ namespace LinearAlgebra
         << "You tried to access element " << arg1
         << " of a distributed vector, but this element is not "
         << "stored on the current processor. Note: The range of "
-        << "locally owned elements is " << arg2 << " to " << arg3
-        << ", and there are " << arg4 << " ghost elements "
+        << "locally owned elements is [" << arg2 << "," << arg3
+        << "], and there are " << arg4 << " ghost elements "
         << "that this vector can access."
         << "\n\n"
         << "A common source for this kind of problem is that you "
@@ -1589,7 +1589,7 @@ namespace LinearAlgebra
           partitioner->ghost_indices().is_element(global_index),
         ExcAccessToNonLocalElement(global_index,
                                    partitioner->local_range().first,
-                                   partitioner->local_range().second,
+                                   partitioner->local_range().second - 1,
                                    partitioner->ghost_indices().n_elements()));
       // do not allow reading a vector which is not in ghost mode
       Assert(partitioner->in_local_range(global_index) ||
@@ -1613,7 +1613,7 @@ namespace LinearAlgebra
           partitioner->ghost_indices().is_element(global_index),
         ExcAccessToNonLocalElement(global_index,
                                    partitioner->local_range().first,
-                                   partitioner->local_range().second,
+                                   partitioner->local_range().second - 1,
                                    partitioner->ghost_indices().n_elements()));
       // we would like to prevent reading ghosts from a vector that does not
       // have them imported, but this is not possible because we might be in a
index f9fa79f0129376c7e37f432162cd9d8f5f20c448..d3b4cb91e6c49784fcb68a779784795a2ee1844d 100644 (file)
@@ -179,8 +179,8 @@ namespace PETScWrappers
         int,
         int,
         << "You tried to access element " << arg1
-        << " of a distributed vector, but only elements " << arg2 << " through "
-        << arg3 << " are stored locally and can be accessed."
+        << " of a distributed vector, but only elements in range [" << arg2
+        << "," << arg3 << "] are stored locally and can be accessed."
         << "\n\n"
         << "A common source for this kind of problem is that you "
         << "are passing a 'fully distributed' vector into a function "
index 0731bfbe51c100ef8ce055d674af845f9ffd4c5d..61aef7f65027352eff0f167601bede8633779e87 100644 (file)
@@ -1830,9 +1830,9 @@ namespace TrilinosWrappers
                    size_type,
                    << "You tried to access element (" << arg1 << "/" << arg2
                    << ")"
-                   << " of a distributed matrix, but only rows " << arg3
-                   << " through " << arg4
-                   << " are stored locally and can be accessed.");
+                   << " of a distributed matrix, but only rows in range ["
+                   << arg3 << "," << arg4
+                   << "] are stored locally and can be accessed.");
 
     /**
      * Exception
index d33df01790720113cd3eddbeeb5f16c2c0198b8d..897579e9794eae740cd3ac2e5c5cb7a7fa8b3cad 100644 (file)
@@ -969,9 +969,9 @@ namespace TrilinosWrappers
                    size_type,
                    << "You tried to access element (" << arg1 << "/" << arg2
                    << ")"
-                   << " of a distributed matrix, but only rows " << arg3
-                   << " through " << arg4
-                   << " are stored locally and can be accessed.");
+                   << " of a distributed matrix, but only rows in range ["
+                   << arg3 << "," << arg4
+                   << "] are stored locally and can be accessed.");
 
     /**
      * Exception
index dfb0eeb925f341131d54b0c216c18707b32ee637..7daa481a00937ba5f4ed7d19472eabb55423eca3 100644 (file)
@@ -1278,9 +1278,8 @@ namespace TrilinosWrappers
         << " of a distributed vector, but this element is not stored "
         << "on the current processor. Note: There are " << arg2
         << " elements stored "
-        << "on the current processor from within the range " << arg3
-        << " through " << arg4
-        << " but Trilinos vectors need not store contiguous "
+        << "on the current processor from within the range [" << arg3 << ","
+        << arg4 << "] but Trilinos vectors need not store contiguous "
         << "ranges on each processor, and not every element in "
         << "this range may in fact be stored locally."
         << "\n\n"
index da98196c535e3b484e676021688ac62f51a0fa50..41263d5b079f8ca5956ddec4050e123bda9569f3 100644 (file)
@@ -1184,7 +1184,7 @@ namespace TrilinosWrappers
       {
         Assert(false,
                ExcAccessToNonLocalElement(
-                 i, j, local_range().first, local_range().second));
+                 i, j, local_range().first, local_range().second - 1));
       }
     else
       {

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.