]> https://gitweb.dealii.org/ - dealii.git/commitdiff
now implement correct version 13601/head
authorNiklas Fehn <fehn@lnm.mw.tum.de>
Fri, 8 Apr 2022 14:08:39 +0000 (16:08 +0200)
committerNiklas Fehn <fehn@lnm.mw.tum.de>
Fri, 8 Apr 2022 14:08:39 +0000 (16:08 +0200)
source/base/mpi_remote_point_evaluation.cc

index 4af01fa5cc95fde6f4fbe5e9be5d92abea7b8e20..dd1907609a9493240168c099f9d82466c64ec4a8 100644 (file)
@@ -192,9 +192,10 @@ namespace Utilities
       if (is_map_unique())
         return true;
 
-      for (unsigned int i = 1; i < point_ptrs.size(); ++i)
-        if (point_found(i) == false)
-          return false;
+      if (point_ptrs.size() > 0)
+        for (unsigned int i = 0; i < point_ptrs.size() - 1; ++i)
+          if (point_found(i) == false)
+            return false;
 
       return true;
     }
@@ -206,8 +207,8 @@ namespace Utilities
     RemotePointEvaluation<dim, spacedim>::point_found(
       const unsigned int i) const
     {
-      AssertIndexRange(i, point_ptrs.size());
-      return (point_ptrs[i] - (i > 0) ? point_ptrs[i - 1] : 0) > 0;
+      AssertIndexRange(i, point_ptrs.size() - 1);
+      return (point_ptrs[i + 1] - point_ptrs[i]) > 0;
     }
 
 

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.