]> https://gitweb.dealii.org/ - dealii.git/commitdiff
ScaLAPACK tests: use matrix typeid in creation of random matrices
authorBenjamin Brands <benjamin.brands@fau.de>
Tue, 6 Feb 2018 10:25:12 +0000 (11:25 +0100)
committerBenjamin Brands <benjamin.brands@fau.de>
Tue, 6 Feb 2018 10:25:12 +0000 (11:25 +0100)
tests/lapack/create_matrix.h

index 7e4e2d40523b371053c162a10d5eb16be2b07783..a06bd006bbcceb7299d8cdd55ae02ba0aa7cd82d 100644 (file)
@@ -26,7 +26,7 @@ void create_spd (FullMatrix &A)
   for (unsigned int i = 0; i < size; ++i)
     for (unsigned int j = i; j < size; ++j)
       {
-        const double val = random_value<double>();
+        const double val = random_value<typename FullMatrix::value_type>();
         Assert (val >= 0. && val <= 1.,
                 ExcInternalError());
         if (i==j)
@@ -48,5 +48,5 @@ void create_random (FullMatrix &A)
 {
   for (unsigned int i = 0; i < A.m(); ++i)
     for (unsigned int j = 0; j < A.n(); ++j)
-      A(i,j) = random_value<double>();
+      A(i,j) = random_value<typename FullMatrix::value_type>();
 }

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.