]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make things work with complex-valued vectors.
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 30 Oct 2017 22:32:59 +0000 (16:32 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 30 Oct 2017 22:32:59 +0000 (16:32 -0600)
include/deal.II/numerics/vector_tools.templates.h

index 3694ce4be2bf0c6fa5cca3213c6d38c837f309cc..54cff879a528b6c9c56c0d76edd10e460439f42c 100644 (file)
@@ -7265,9 +7265,10 @@ namespace VectorTools
               for (unsigned int q=0; q<n_q_points; ++q)
                 {
                   // compute (f.n) n
-                  const Number f_dot_n
-                    = (data.psi_grads[q][k] * fe_values.normal_vector(q));
-                  const Tensor<1,spacedim,Number> f_dot_n_times_n (f_dot_n * fe_values.normal_vector(q));
+                  const typename ProductType<Number,double>::type f_dot_n
+                    = data.psi_grads[q][k] * fe_values.normal_vector(q);
+                  const Tensor<1,spacedim,Number> f_dot_n_times_n
+                    = f_dot_n * fe_values.normal_vector(q);
 
                   data.psi_grads[q][k] -= (data.function_grads[q][k] + f_dot_n_times_n);
                 }

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.