]> https://gitweb.dealii.org/ - dealii.git/commitdiff
scale random entries in test to make tolerance check work. This should fix the test...
authorTimo Heister <timo.heister@gmail.com>
Wed, 4 Dec 2013 16:02:43 +0000 (16:02 +0000)
committerTimo Heister <timo.heister@gmail.com>
Wed, 4 Dec 2013 16:02:43 +0000 (16:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@31878 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/full_matrix_04.cc

index c40b0b73fc0c4f7499259c9a6729f85d9e473147..32f66e3a1ca58adc2d9eba9b0789e51323469a15 100644 (file)
@@ -52,16 +52,16 @@ void test (const unsigned int n, const unsigned int m)
   for (unsigned int i=0; i<n; ++i)
     {
       for (unsigned int j=0; j<n; ++j)
-        A(i,j) = Testing::rand();
+        A(i,j) = Testing::rand()/(1.0*RAND_MAX);
       for (unsigned int j=0; j<m; ++j)
         {
-          B(i,j) = Bt(j,i) = Testing::rand();
-          D(j,i) = Dt(i,j) = Testing::rand();
+          B(i,j) = Bt(j,i) = Testing::rand()/(1.0*RAND_MAX);
+          D(j,i) = Dt(i,j) = Testing::rand()/(1.0*RAND_MAX);
         }
     }
   for (unsigned int i=0; i<m; ++i)
     for (unsigned int j=0; j<m; ++j)
-      C(i,j) = Testing::rand();
+      C(i,j) = Testing::rand()/(1.0*RAND_MAX);
 
   // Compare first Schur complement
   // with mmult.
@@ -123,7 +123,6 @@ main ()
   std::ofstream logfile(logname.c_str());
   deallog.attach(logfile);
   deallog.depth_console(0);
-  Testing::srand(3391466);
 
   test(3,4);
   test(4,7);

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.