]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor cleanup to make function work with VectorizedArray 1040/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 25 Jun 2015 12:40:35 +0000 (14:40 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 25 Jun 2015 12:41:06 +0000 (14:41 +0200)
include/deal.II/base/point.h

index 2a102430c4e4bf3a27c6f3badf4d20499d4fc35c..51bb6e441c44441c5a164093501f89abd1afe912 100644 (file)
@@ -430,10 +430,10 @@ inline
 Number
 Point<dim,Number>::distance (const Point<dim,Number> &p) const
 {
-  Number sum=0;
+  Number sum = Number();
   for (unsigned int i=0; i<dim; ++i)
     {
-      const double diff=this->values[i]-p(i);
+      const Number diff=this->values[i]-p(i);
       sum += diff*diff;
     }
 

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.