]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix CUDAVector::add_and_dot() for complex-valued vectors. 5750/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 18 Jan 2018 04:06:59 +0000 (21:06 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 19 Jan 2018 04:32:53 +0000 (21:32 -0700)
source/lac/cuda_vector.cu

index 355383bf27015db3cff2191c72dd63cb80618a08..41501d896889d5f4486d284f7b43b13c0cde469b 100644 (file)
@@ -451,7 +451,7 @@ namespace LinearAlgebra
         if (global_idx < N)
           {
             v1[global_idx] += a*v2[global_idx];
-            res_buf[local_idx] = v1[global_idx]*v3[global_idx];
+            res_buf[local_idx] = v1[global_idx] * Number(numbers::NumberTraits<Number>::conjugate(v3[global_idx]));
           }
         else
           res_buf[local_idx] = 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.