]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix more powers
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 3 Jul 2015 07:27:24 +0000 (09:27 +0200)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 3 Jul 2015 07:27:24 +0000 (09:27 +0200)
compiling on Mac with clang 5.0.0 (3.3) again

include/deal.II/numerics/vector_tools.templates.h

index 56c7a5025f450d785b5727cb69dad0f0081f47e1..3995bea746e6010db73e240286d0ea1b07a711e8 100644 (file)
@@ -6246,8 +6246,9 @@ namespace VectorTools
             {
               double sum = 0;
               for (unsigned int k=0; k<n_components; ++k)
-                sum += std::pow(data.psi_values[q](k)*data.psi_values[q](k),
-                                exponent/2.) * data.weight_vectors[q](k);
+                sum += std::pow(
+                         static_cast<double>(data.psi_values[q](k)*data.psi_values[q](k)),
+                         exponent/2.) * data.weight_vectors[q](k);
               diff += sum * fe_values.JxW(q);
             }
 
@@ -6298,8 +6299,9 @@ namespace VectorTools
             {
               double sum = 0;
               for (unsigned int k=0; k<n_components; ++k)
-                sum += std::pow(data.psi_grads[q][k]*data.psi_grads[q][k],
-                                exponent/2.) * data.weight_vectors[q](k);
+                sum += std::pow(
+                         static_cast<double>(data.psi_grads[q][k]*data.psi_grads[q][k]),
+                         exponent/2.) * data.weight_vectors[q](k);
               diff += sum * fe_values.JxW(q);
             }
           diff = std::pow(diff, 1./exponent);

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.