]> https://gitweb.dealii.org/ - dealii.git/commitdiff
use Testing::rand() to generate matrices
authorDenis Davydov <davydden@gmail.com>
Wed, 27 Sep 2017 07:09:54 +0000 (09:09 +0200)
committerDenis Davydov <davydden@gmail.com>
Wed, 27 Sep 2017 07:15:01 +0000 (09:15 +0200)
tests/lapack/create_matrix.h
tests/lapack/full_matrix_17.output

index 2e147847f8fe5e08aa1fe478eb45050ec8391976..4d97ffab24138f8870e90b935b78a4cf361244c7 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 = (double)rand()/RAND_MAX;
+        const double val = (double)Testing::rand()/RAND_MAX;
         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) = (double)rand()/RAND_MAX;
+      A(i,j) = (double)Testing::rand()/RAND_MAX;
 }
index a0247b26be06b4566551dcf197b8200ee57e6c82..d1e1e26dc80b690676ef38f1ad963a7c7d4fcfe1 100644 (file)
@@ -2,16 +2,16 @@
 DEAL::size=1
 DEAL::1.00000 1.00000
 DEAL::size=3
-DEAL::0.482025 0.563918
+DEAL::0.434647 0.510929
 DEAL::size=11
-DEAL::0.425003 0.466425
+DEAL::0.435520 0.507804
 DEAL::size=17
-DEAL::0.426863 0.467023
+DEAL::0.395690 0.400421
 DEAL::size=32
-DEAL::0.441550 0.493985
+DEAL::0.434527 0.473907
 DEAL::size=64
-DEAL::0.452016 0.459357
+DEAL::0.455954 0.477104
 DEAL::size=200
-DEAL::0.467209 0.490028
+DEAL::0.459303 0.489033
 DEAL::size=391
-DEAL::0.468957 0.486322
+DEAL::0.467695 0.485294

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.