]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Avoid a couple of warnings about past-the-end accesses.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 2 Nov 2012 19:41:47 +0000 (19:41 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 2 Nov 2012 19:41:47 +0000 (19:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@27319 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/matrix_free/matrix_free.templates.h

index 1fc7d26320a73c3c42dab253205180f8636bc82e..c26e375a722ebe01389a1895103669f8234a0c61 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2011 by the deal.II authors
+//    Copyright (C) 2011, 2012 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1104,7 +1104,7 @@ namespace internal
                                                       number(scaling));
         return static_cast<unsigned int>
           (boost::hash_range(&mod_tensor[0][0],
-                             &mod_tensor[0][0]+dim*vectorization_length));
+                             &mod_tensor[dim-1][vectorization_length-1]+1));
       }
     else
       {
@@ -1116,8 +1116,7 @@ namespace internal
                                                            number(scaling));
         return static_cast<unsigned int>(boost::hash_range
                                          (&mod_tensor[0][0][0],
-                                          &mod_tensor[0][0][0]+
-                                          dim*dim*vectorization_length));
+                                          &mod_tensor[dim-1][dim-1][vectorization_length-1]+1));
       }
   }
 

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.