From 4dd5c63c16b80e3e6718443e10af7fde56d99341 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 27 Sep 2017 09:09:54 +0200 Subject: [PATCH] use Testing::rand() to generate matrices --- tests/lapack/create_matrix.h | 4 ++-- tests/lapack/full_matrix_17.output | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/lapack/create_matrix.h b/tests/lapack/create_matrix.h index 2e147847f8..4d97ffab24 100644 --- a/tests/lapack/create_matrix.h +++ b/tests/lapack/create_matrix.h @@ -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; } diff --git a/tests/lapack/full_matrix_17.output b/tests/lapack/full_matrix_17.output index a0247b26be..d1e1e26dc8 100644 --- a/tests/lapack/full_matrix_17.output +++ b/tests/lapack/full_matrix_17.output @@ -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 -- 2.39.5