]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace "rand" by "myrand" in the testsuite to avoid a name clash
authorMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 22 Nov 2013 14:28:04 +0000 (14:28 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 22 Nov 2013 14:28:04 +0000 (14:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@31759 0785d39b-7218-0410-832d-ea1e28bc413d

180 files changed:
tests/aniso/anisotropic_crash.cc
tests/aniso/refine_and_coarsen_anisotropic.cc
tests/base/full_tensor_10.cc
tests/base/geometry_info_1.cc
tests/base/index_set_14.cc
tests/base/index_set_15.cc
tests/base/index_set_17.cc
tests/base/index_set_18.cc
tests/base/index_set_19.cc
tests/base/index_set_20.cc
tests/base/index_set_22.cc
tests/base/polynomial_lagrange_ops.cc
tests/base/polynomial_lagrange_order.cc
tests/base/polynomial_lagrange_product.cc
tests/base/symmetric_tensor_19.cc
tests/base/symmetric_tensor_25.cc
tests/base/symmetric_tensor_26.cc
tests/benchmarks/test_assembly/step-22.cc
tests/benchmarks/test_poisson/poisson.cc
tests/bits/chunk_sparse_matrix_15.cc
tests/bits/fe_q_constraints.cc
tests/bits/find_cell_6.cc
tests/bits/full_matrix_56.cc
tests/bits/joa_1.cc
tests/bits/point_value_hp_01.cc
tests/bits/point_value_hp_02.cc
tests/bits/rt_2.cc
tests/bits/step-15.cc
tests/deal.II/coarsening_02.cc
tests/deal.II/coarsening_02_1d.cc
tests/deal.II/constraint_graph.cc
tests/deal.II/constraints_local_to_global.cc
tests/deal.II/constraints_local_to_global_chunk.cc
tests/deal.II/dof_handler_number_cache.cc
tests/deal.II/dof_handler_number_cache_02.cc
tests/distributed_grids/2d_coarsening_02.cc
tests/distributed_grids/2d_coarsening_03.cc
tests/distributed_grids/2d_coarsening_05.cc
tests/distributed_grids/2d_refinement_02.cc
tests/distributed_grids/2d_refinement_03.cc
tests/distributed_grids/2d_refinement_05.cc
tests/distributed_grids/3d_coarsening_02.cc
tests/distributed_grids/3d_coarsening_03.cc
tests/distributed_grids/3d_coarsening_04.cc
tests/distributed_grids/3d_coarsening_05.cc
tests/distributed_grids/3d_refinement_02.cc
tests/distributed_grids/3d_refinement_03.cc
tests/distributed_grids/3d_refinement_05.cc
tests/distributed_grids/3d_refinement_08.cc
tests/distributed_grids/count_dofs_per_block_01.cc
tests/distributed_grids/dof_handler_number_cache.cc
tests/distributed_grids/solution_transfer_03.cc
tests/fail/abf_approximation_01.cc
tests/fail/hp-step-15.cc
tests/fail/vectors_boundary_rhs_hp_02.cc
tests/fail/vectors_rhs_hp_02.cc
tests/fe/rt_8.cc
tests/fe/rt_9.cc
tests/fe/rt_approximation_01.cc
tests/fe/rt_normal_02.cc
tests/hp/count_dofs_per_block_01.cc
tests/hp/count_dofs_per_block_02.cc
tests/hp/crash_06.cc
tests/hp/crash_10.cc
tests/hp/crash_16.cc
tests/hp/create_laplace_matrix_01.cc
tests/hp/create_laplace_matrix_01b.cc
tests/hp/create_laplace_matrix_02.cc
tests/hp/create_laplace_matrix_02b.cc
tests/hp/create_laplace_matrix_03.cc
tests/hp/create_laplace_matrix_03b.cc
tests/hp/create_laplace_matrix_04.cc
tests/hp/create_laplace_matrix_04b.cc
tests/hp/create_laplace_matrix_constraints_02.cc
tests/hp/create_laplace_matrix_constraints_02b.cc
tests/hp/create_mass_matrix_01.cc
tests/hp/create_mass_matrix_01b.cc
tests/hp/create_mass_matrix_02.cc
tests/hp/create_mass_matrix_02b.cc
tests/hp/create_mass_matrix_03.cc
tests/hp/create_mass_matrix_03b.cc
tests/hp/create_mass_matrix_04.cc
tests/hp/create_mass_matrix_04b.cc
tests/hp/create_mass_matrix_05.cc
tests/hp/create_mass_matrix_constraints_02.cc
tests/hp/create_mass_matrix_constraints_02b.cc
tests/hp/dof_handler_number_cache.cc
tests/hp/get_active_fe_indices.cc
tests/hp/hp_hanging_nodes_02.cc
tests/hp/integrate_difference.cc
tests/hp/integrate_difference_02.cc
tests/hp/matrices_hp.cc
tests/hp/n_active_fe_indices.cc
tests/hp/random.cc
tests/hp/solution_transfer.cc
tests/hp/step-3b.cc
tests/hp/step-3c.cc
tests/hp/vectors_boundary_rhs_01.cc
tests/hp/vectors_boundary_rhs_02.cc
tests/hp/vectors_boundary_rhs_03.cc
tests/hp/vectors_boundary_rhs_hp_01.cc
tests/hp/vectors_boundary_rhs_hp_03.cc
tests/hp/vectors_point_source_01.cc
tests/hp/vectors_point_source_hp_01.cc
tests/hp/vectors_rhs_01.cc
tests/hp/vectors_rhs_02.cc
tests/hp/vectors_rhs_03.cc
tests/hp/vectors_rhs_hp_01.cc
tests/hp/vectors_rhs_hp_03.cc
tests/lac/full_matrix.cc
tests/lac/full_matrix_04.cc
tests/lac/gmres_reorthogonalize_01.cc
tests/lac/gmres_reorthogonalize_03.cc
tests/lac/precondition_chebyshev_01.cc
tests/lac/sparse_ilu.cc
tests/lac/sparse_ilu_t.cc
tests/lac/sparse_matrix_Tmmult_01.cc
tests/lac/sparse_matrix_Tmmult_02.cc
tests/lac/sparse_matrix_mmult_01.cc
tests/lac/sparse_matrix_mmult_02.cc
tests/lac/sparse_mic.cc
tests/lac/vector_accumulation.cc
tests/matrix_free/copy.cc
tests/matrix_free/evaluate_1d_shape.cc
tests/matrix_free/evaluate_1d_shape_evenodd.cc
tests/matrix_free/get_functions_gl.cc
tests/matrix_free/get_functions_mappingq.cc
tests/matrix_free/get_functions_multife.cc
tests/matrix_free/get_functions_multife2.cc
tests/matrix_free/get_functions_q_hierarchical.cc
tests/matrix_free/get_functions_rect.cc
tests/matrix_free/get_functions_variants.cc
tests/matrix_free/get_values_plain.cc
tests/matrix_free/integrate_functions.cc
tests/matrix_free/integrate_functions_multife.cc
tests/matrix_free/integrate_functions_multife2.cc
tests/matrix_free/matrix_vector_10.cc
tests/matrix_free/matrix_vector_11.cc
tests/matrix_free/matrix_vector_12.cc
tests/matrix_free/matrix_vector_13.cc
tests/matrix_free/matrix_vector_curl.cc
tests/matrix_free/matrix_vector_div.cc
tests/matrix_free/matrix_vector_hp.cc
tests/matrix_free/matrix_vector_mg.cc
tests/matrix_free/matrix_vector_stokes.cc
tests/matrix_free/matrix_vector_stokes_noflux.cc
tests/matrix_free/no_index_initialize.cc
tests/matrix_free/thread_correctness.cc
tests/matrix_free/thread_correctness_hp.cc
tests/matrix_free/update_mapping_only.cc
tests/mpi/constraint_matrix_trilinos_bug.cc
tests/mpi/count_dofs_per_block_02.cc
tests/mpi/crash_03.cc
tests/mpi/dof_handler_number_cache.cc
tests/mpi/mg_05.cc
tests/mpi/mg_06.cc
tests/mpi/p4est_2d_constraintmatrix_03.cc
tests/mpi/p4est_2d_constraintmatrix_04.cc
tests/mpi/p4est_2d_dofhandler_02.cc
tests/mpi/p4est_2d_dofhandler_03.cc
tests/mpi/p4est_2d_dofhandler_04.cc
tests/mpi/p4est_2d_refine_03.cc
tests/mpi/p4est_3d_constraintmatrix_01.cc
tests/mpi/p4est_3d_constraintmatrix_02.cc
tests/mpi/p4est_3d_constraintmatrix_03.cc
tests/mpi/p4est_3d_refine_01.cc
tests/mpi/trilinos_matvec_01.cc
tests/mpi/trilinos_matvec_02.cc
tests/mpi/trilinos_matvec_03.cc
tests/petsc/66.cc
tests/petsc/67.cc
tests/petsc/68.cc
tests/petsc/69.cc
tests/petsc/slowness_04.cc
tests/tests.h
tests/trilinos/66.cc
tests/trilinos/67.cc
tests/trilinos/68.cc
tests/trilinos/69.cc
tests/trilinos/slowness_04.cc

index de5f4bc0e62a8dc74ff7316530cfb7f513429845..9429c1d5b7a55727dac7fcfff9adb200dc6a4c70 100644 (file)
@@ -55,7 +55,7 @@ int main()
   Triangulation<2>::active_cell_iterator cell = tri.begin_active(), end = tri.end();
   for ( ; cell != end; ++cell )
     {
-      switch (rand()%4)
+      switch (myrand()%4)
         {
           /// If a randomly drawn
           /// number is 0 or 1 we
index 2d3b1aa5a09ac191b12c6a2a3e9d4c673bdaf4d3..be0f76b27a2d057acac90f6b94c7116608635c31 100644 (file)
@@ -81,10 +81,10 @@ void test_isotropic (int type, std::ostream *logfile)
     {
       cell = tria.begin_active();
       for (; cell!=endc; ++cell)
-        if (rand()%5==0)
+        if (myrand()%5==0)
           {
-            if (rand()%2==0)
-              cell->set_refine_flag(ref_cases[rand()%
+            if (myrand()%2==0)
+              cell->set_refine_flag(ref_cases[myrand()%
                                               RefinementCase<dim>::isotropic_refinement]);
           }
         else
index cf01390379009b6936a54fd6863735fa5d9a1e18..3f45efeedadf547e47ce77a1744cdda24d08d44f 100644 (file)
@@ -33,7 +33,7 @@ void test ()
   // as in symmetric_tensor_10
   for (unsigned int i=0; i<dim; ++i)
     for (unsigned int j=0; j<dim; ++j)
-      t[i][j] = 1. * rand() / RAND_MAX;
+      t[i][j] = 1. * myrand() / RAND_MAX;
 
   for (unsigned int i=0; i<dim; ++i)
     for (unsigned int j=0; j<dim; ++j)
index e639c874553cbf7a8bcd77acb03c5247e5336411..ca7e276a883ac9c79e54641a7c82da953481fbb6 100644 (file)
@@ -27,7 +27,7 @@
 
 double rand_2 ()
 {
-  return 1.*rand()/RAND_MAX*4-2.;
+  return 1.*myrand()/RAND_MAX*4-2.;
 }
 
 
index 8a946f38a570f8346f700e41d54042ce371b497c..3f794dcf827078b01b221da30317577c597fee1f 100644 (file)
@@ -37,8 +37,8 @@ void test ()
   // repetitions of previous ones
   for (unsigned int i=0; i<9*is1.size()/10; ++i)
     {
-      is1.add_index (rand() % is1.size());
-      is2.add_index (rand() % is2.size());
+      is1.add_index (myrand() % is1.size());
+      is2.add_index (myrand() % is2.size());
     }
 
   IndexSet is3 = is1 & is2;
index 0f99ace48bb7e97eacde8d41579a78470ffd746c..21c66c48fe36e5ecddc7143834c061b83db786cd 100644 (file)
@@ -37,8 +37,8 @@ void test ()
   // repetitions of previous ones
   for (unsigned int i=0; i<9*is1.size()/10; ++i)
     {
-      is1.add_index (rand() % is1.size());
-      is2.add_index (rand() % is2.size());
+      is1.add_index (myrand() % is1.size());
+      is2.add_index (myrand() % is2.size());
     }
 
   IndexSet is3 = is1;
index cc9ac002ba2475ac190c623a161b292bd663cec1..cd5422a7b24141dd3807c4525010552a877edec2 100644 (file)
@@ -36,7 +36,7 @@ void test ()
   // repetitions of previous ones
   for (unsigned int i=0; i<9*is1.size()/10; ++i)
     {
-      is1.add_index (rand() % is1.size());
+      is1.add_index (myrand() % is1.size());
     }
 
   is1.compress();
index b5274e1e16b1dd37be3b3f5a2cb08d441c54d15c..5c101775fb947fa0b732e4ed36342d02a21207ba 100644 (file)
@@ -35,7 +35,7 @@ void test ()
   // set, some of which may be
   // repetitions of previous ones
   for (unsigned int i=0; i<9*is1.size()/10; ++i)
-    is1.add_index (rand() % is1.size());
+    is1.add_index (myrand() % is1.size());
 
   is1.compress();
 
index d8bd8f3b1fcf7250ab1b6a55edd4dcfd18a762d4..04476b4d71a992818e184b5d51a63b68b14319a5 100644 (file)
@@ -35,7 +35,7 @@ void test ()
   // set, some of which may be
   // repetitions of previous ones
   for (unsigned int i=0; i<9*is1.size()/10; ++i)
-    is1.add_index (rand() % is1.size());
+    is1.add_index (myrand() % is1.size());
 
   std::vector<types::global_dof_index> indices;
   is1.fill_index_vector (indices);
index cd948f2a89df9c8644dd8329bdd017e342e29bd8..7e985b391d5cbb12e137cf6bb29ee3831891cdb5 100644 (file)
@@ -86,8 +86,8 @@ void test()
       IndexSet b(size);
       for (unsigned int i=0; i<9*a.size()/10; ++i)
         {
-          a.add_index (rand() % a.size());
-          b.add_index (rand() % a.size());
+          a.add_index (myrand() % a.size());
+          b.add_index (myrand() % a.size());
         }
       testor(a, b, false);
     }
index 3afe5198686bab8a4d55f7b07612dfc79cdde9f6..ea0ffe37b7cdf4bbc9d0fd7f5392574a28481721 100644 (file)
@@ -35,7 +35,7 @@ void test ()
   // set, some of which may be
   // repetitions of previous ones
   for (unsigned int i=0; i<9*is1.size()/10; ++i)
-    is1.add_index (rand() % is1.size());
+    is1.add_index (myrand() % is1.size());
 
   std::vector<bool> zeros_and_ones(is1.size());
   is1.fill_binary_vector (zeros_and_ones);
index 56a1befe521e3be8f767ae5bdd62c56336748ed0..4a4d662f23477e8a2d18cd5529ec904132010d6e 100644 (file)
@@ -37,8 +37,8 @@ void check_scale (const std::vector<Polynomial<double> > &p)
   for (unsigned int i=0; i<p.size(); ++i)
     {
       Polynomial<double> q = p[i];
-      double x = (double)rand()/RAND_MAX;
-      double factor = 5.*(double)rand()/RAND_MAX;
+      double x = (double)myrand()/RAND_MAX;
+      double factor = 5.*(double)myrand()/RAND_MAX;
       q.scale (factor);
       double value1 = p[i].value (factor * x);
       double value2 = q   .value (x);
@@ -62,8 +62,8 @@ void check_shift (const std::vector<Polynomial<double> > &p)
   for (unsigned int i=0; i<p.size(); ++i)
     {
       Polynomial<double> q = p[i];
-      double x = (double)rand()/RAND_MAX;
-      double a = 10.*(-1.+2.*(double)rand()/RAND_MAX);
+      double x = (double)myrand()/RAND_MAX;
+      double a = 10.*(-1.+2.*(double)myrand()/RAND_MAX);
       q.shift (a);
       double value1 = p[i].value (x+a);
       double value2 = q   .value (x);
@@ -83,8 +83,8 @@ void check_mult_scalar (const std::vector<Polynomial<double> > &p)
   for (unsigned int i=0; i<p.size(); ++i)
     {
       Polynomial<double> q = p[i];
-      double x = (double)rand()/RAND_MAX;
-      double a = (double)rand()/RAND_MAX;
+      double x = (double)myrand()/RAND_MAX;
+      double a = (double)myrand()/RAND_MAX;
       q *= a;
       double value1 = p[i].value (x) * a;
       double value2 = q   .value (x);
@@ -107,7 +107,7 @@ void check_mult (const std::vector<Polynomial<double> > &p)
         {
           Polynomial<double> q = p[i];
           q *= p[j];
-          double x = (double)rand()/RAND_MAX;
+          double x = (double)myrand()/RAND_MAX;
           double value1 = p[i].value (x) * p[j].value(x);
           double value2 = q   .value (x);
           if (std::fabs(value1-value2) > std::max(1e-13,1e-13*std::fabs(value1)))
@@ -139,7 +139,7 @@ void check_expand (const std::vector<Polynomial<double> > &p)
   for (unsigned int i=0; i<p.size(); ++i)
     {
       Polynomial<double> q = p[i];
-      double x = (double)rand()/RAND_MAX;
+      double x = (double)myrand()/RAND_MAX;
       q += zero;
       double value1 = p[i].value (x);
       double value2 = q   .value (x);
@@ -166,7 +166,7 @@ void check_mult_expand (const std::vector<Polynomial<double> > &p)
           Polynomial<double> q = p[i];
           q += zero;
           q *= p[j];
-          double x = (double)rand()/RAND_MAX;
+          double x = (double)myrand()/RAND_MAX;
           double value1 = p[i].value (x) * p[j].value(x);
           double value2 = q   .value (x);
           if (std::fabs(value1-value2) > std::max(1e-10,1e-10*std::fabs(value1)))
index 740a671c515dafb9807ecc6e3e91deac53840d5e..9899f14182aeada391661249339fe82eec14e353 100644 (file)
@@ -68,7 +68,7 @@ void check_constant (const std::vector<Polynomial<double> > &p)
   deallog << "Representation of one at random points";
   for (unsigned int j=0; j<12; ++j)
     {
-      double x = (double)rand()/RAND_MAX;
+      double x = (double)myrand()/RAND_MAX;
       double value = 0;
       for (unsigned int i=0; i<p.size(); ++i)
         {
index 61499171431837c723395b4ca40e5e1e27627594..47d3aced5310b4665eace5a1b46c7077adefadcd 100644 (file)
@@ -46,7 +46,7 @@ void check_derivatives (const std::vector<Polynomial<double> > &p,
   Monomial<double> zero (0,0);
   for (unsigned int j=0; j<p.size(); ++j)
     {
-      double x = (double)rand()/RAND_MAX;
+      double x = (double)myrand()/RAND_MAX;
       p[j].value (x, values);
       Polynomial<double> q = p[j];
       q += zero;
index f2044868126252288c74f2200d8715e7b044ef6c..64d7b96a60ef663b0100cce21a2cd4398ec6643b 100644 (file)
@@ -112,7 +112,7 @@ void test ()
         for (unsigned int j=0; j<3; ++j)
           for (unsigned int k=0; k<3; ++k)
             for (unsigned int l=0; l<3; ++l)
-              A[i][j][k][l] = 1.*rand()/RAND_MAX;
+              A[i][j][k][l] = 1.*myrand()/RAND_MAX;
       break;
 
     default:
index d61f2359e4818b04f7c24c27e8d6eb43d52c6765..46026f214f88c310fe8b3673d7d8f8ccee51c659 100644 (file)
@@ -33,7 +33,7 @@ void check ()
     {
       SymmetricTensor<2,dim> S;
       for (unsigned int i=0; i<S.n_independent_components; ++i)
-        S[S.unrolled_to_component_indices (i)] = rand() % 10;
+        S[S.unrolled_to_component_indices (i)] = myrand() % 10;
 
       deallog << "S = " << S << std::endl;
       deallog << "first invariant  = " << first_invariant(S) << std::endl;
index 59a6b28c447dfc5c5281eef054389008b780320f..7a15ffa345e63513f504646cf31bee0ea42c002f 100644 (file)
@@ -30,11 +30,11 @@ void check ()
 {
   SymmetricTensor<2,dim> S;
   for (unsigned int i=0; i<S.n_independent_components; ++i)
-    S[S.unrolled_to_component_indices (i)] = rand() % 10;
+    S[S.unrolled_to_component_indices (i)] = myrand() % 10;
 
   Tensor<1,dim> x;
   for (unsigned int i=0; i<dim; ++i)
-    x[i] = rand() % 10;
+    x[i] = myrand() % 10;
 
   deallog << "S = " << S << std::endl;
   deallog << "x = " << x << std::endl;
index 5b8d48f9094e4cf2b66d88c2be38b85b39b03bbf..b645bb79840926704fd7ca52c4b6d0fe72fd4b1a 100644 (file)
@@ -1197,7 +1197,7 @@ namespace Step22
     Vector<float> estimated_error_per_cell (triangulation.n_active_cells());
     srand (0);
     for (unsigned int i=0; i<estimated_error_per_cell.size(); ++i)
-      estimated_error_per_cell(i) = 1.0*(rand() % 1000);
+      estimated_error_per_cell(i) = 1.0*(myrand() % 1000);
     /*
         std::vector<bool> component_mask (dim+1, false);
         component_mask[dim] = true;
index b9448adf95cf32e689d10b51c1f84136386b98ee..c7f15c31b2c46a97465574559b5d9948f4567c59 100644 (file)
@@ -177,7 +177,7 @@ void HelmholtzProblem<dim>::solve ()
   for (unsigned int i=0; i<tri_rhs.size(); i++)
     if (hanging_node_constraints.is_constrained(i)==false)
       {
-        const double value = (double)rand()/RAND_MAX;
+        const double value = (double)myrand()/RAND_MAX;
         tri_rhs(i) = value;
       }
 
index 478334ee74395f1318ae5a68cebff1f3a0eb8ba8..d938f327da054069e6867bf9288b7099f8093f59 100644 (file)
@@ -52,7 +52,7 @@ void test (const unsigned int chunk_size)
       // the iterator and compare it with the exact value
       Vector<double> src(m.n()), dst(m.m()), dst_ref(m.m());
       for (unsigned int i=0; i<src.size(); ++i)
-        src(i) = (double)rand()/RAND_MAX;
+        src(i) = (double)myrand()/RAND_MAX;
       for (unsigned int i=0; i<m.m(); ++i)
         {
           double sum = 0;
index 743ea9d7a37742bc41c3401edd634ace20b0e7cc..4e8262c5f24bae92ca0f83cc4aef4b2d919ff4d0 100644 (file)
@@ -78,7 +78,7 @@ TestFunction<dim>::TestFunction (const unsigned int p_order) :
   for (unsigned int d = 0; d < dim; ++d)
     {
       for (unsigned int c = 0; c < p_order; ++c)
-        coeff[c] = (double) rand() / (double) RAND_MAX;
+        coeff[c] = (double) myrand() / (double) RAND_MAX;
       base.push_back (Polynomials::Polynomial<double> (coeff));
     }
 }
@@ -138,7 +138,7 @@ void TestFEQConstraints<dim>::refine_grid_random ()
   Vector<double> estimated_error_per_cell (n_cells);
 
   for (unsigned int i = 0; i < n_cells; ++i)
-    estimated_error_per_cell(i) = (double) rand() / (double) RAND_MAX;
+    estimated_error_per_cell(i) = (double) myrand() / (double) RAND_MAX;
 
   GridRefinement::refine_and_coarsen_fixed_number (triangulation,
                                                    estimated_error_per_cell,
index 6e058dbcf25059850ae6d804c9bc62d7b9f22322..662dc7a3941f44e9d41239ab8692cc3a4a9ba5f7 100644 (file)
@@ -78,7 +78,7 @@ void check1 ()
     {
       for (int j=0; j<1000; ++j)
         {
-          Point<3> p ((rand()%1000)/1000.0,(rand()%1000)/1000.0,(rand()%1000)/1000.0);
+          Point<3> p ((myrand()%1000)/1000.0,(rand()%1000)/1000.0,(rand()%1000)/1000.0);
           if (!inside(tria, p))
             deallog << "NOT INSIDE" << std::endl;
           GridTools::find_active_cell_around_point(tria, p);
@@ -88,7 +88,7 @@ void check1 ()
            cell != tria.end(); ++cell)
         for (unsigned int f=0; f<GeometryInfo<3>::faces_per_cell; ++f)
           {
-            if (cell->face(f)->at_boundary() && (rand()%5)==1)
+            if (cell->face(f)->at_boundary() && (myrand()%5)==1)
               cell->set_refine_flag();
           }
 
index 0476ad79d22af814118999bba0992842ed78c096..b5c0546b7c2b3388ff65529c84af9e5f52f24ec9 100644 (file)
@@ -45,7 +45,7 @@ void random_matrix(FullMatrix<double> &A)
   for (unsigned int i=0; i<A.m(); ++i)
     for (unsigned int j=0; j<A.n(); ++j)
       {
-        double rnd = rand();
+        double rnd = myrand();
         rnd /= RAND_MAX;
         A(i,j) = (i==j) ? A.m()+rnd : rnd;
       }
index 577b8747063e5d8d862e740005141c0a0782a62b..d20bae63b0ca081b0abc40d8b188e4f14d2d0fa3 100644 (file)
@@ -1073,8 +1073,8 @@ void LaplaceProblem<dim>::run ()
   // points inside a radius of 0.9)
   for (int i=0; i<1000; i++)
     {
-      double r = sqrt((0.9*rand()/RAND_MAX));
-      double phi = 2*3.14*(1.0*rand()/RAND_MAX);
+      double r = sqrt((0.9*myrand()/RAND_MAX));
+      double phi = 2*3.14*(1.0*myrand()/RAND_MAX);
       double x = r*cos(phi);
       double y = r*sin(phi);
       Point<2> p(x,y);
index de877e90a81e93417f241fa648a76fcebaeda781..683840a2b396d26ba00b20390519bc455cc2f325 100644 (file)
@@ -123,7 +123,7 @@ check ()
   endc = dof_handler.end();
   for (; cell!=endc; ++cell)
     {
-      cell->set_active_fe_index (rand() % fe.size());
+      cell->set_active_fe_index (myrand() % fe.size());
     }
 
   dof_handler.distribute_dofs (fe);
index 75e202e5dd3161cc36f9584b8be62c4c557c0028..6d27e90f5114dde4b2910820c54cfe4451a971ec 100644 (file)
@@ -132,7 +132,7 @@ check ()
   endc = dof_handler.end();
   for (; cell!=endc; ++cell)
     {
-      cell->set_active_fe_index (rand() % fe.size());
+      cell->set_active_fe_index (myrand() % fe.size());
     }
 
   dof_handler.distribute_dofs (fe);
index 2b2b5755ecb143a54e083edd0908c71ba3c56165..2a41f819903f6458f8dde77e5f46dee7f0461988 100644 (file)
@@ -158,7 +158,7 @@ int main ()
   // values between 0 and 1.
   Vector<double> solution(dof_handler.n_dofs ());
   for (unsigned int i = 0; i < dof_handler.n_dofs (); ++i)
-    solution(i) = (double) rand() / (double) RAND_MAX;
+    solution(i) = (double) myrand() / (double) RAND_MAX;
 
   // Now check if the function is
   // continuous in normal direction
index 32a245930d90b6cd56ff7a013211f33adb6e9b62..b74fac85e64475899c63d10f939bdf8cdd85bf81 100644 (file)
@@ -85,7 +85,7 @@ double InitializationValues::value (const Point<1> &p,
                                     const unsigned int) const
 {
   const double base = std::pow(p(0), 1./3.);
-  const double random = 2.*rand()/RAND_MAX-1;
+  const double random = 2.*myrand()/RAND_MAX-1;
   return std::max (base+.1*random, 0.);
 }
 
index 9826f2f655701ecc0742961aa8a4b16750981aae..7454364b966110c17fa1a5c3dbe57e81133364d6 100644 (file)
@@ -85,7 +85,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index e21446ed5ef82a66a9bc96e498a2a6d3f0c1b288..7f2df7c629576f235b96523b9e2c0a4a3f35a1ed 100644 (file)
@@ -85,7 +85,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index e8c42bfb37f25733d2a4b8c1e2ca56bf55312df0..3370131cf43650d246f67eb14a9ade7f050ddc1c 100644 (file)
@@ -56,7 +56,7 @@ void test ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof_handler.begin_active();
        cell != dof_handler.end(); ++cell)
-    cell->set_active_fe_index (rand() % fe_collection.size());
+    cell->set_active_fe_index (myrand() % fe_collection.size());
 
   dof_handler.distribute_dofs(fe_collection);
 
index 68b58b8734c99aa08346378115fb487ab29a57d9..22d806f83682a8fea896c9c22809ab82756d3158 100644 (file)
@@ -90,7 +90,7 @@ void test ()
           if (counter % 42 == 0)
             local_mat(i,j) = 0;
           else
-            local_mat (i,j) = (double)rand() / RAND_MAX;
+            local_mat (i,j) = (double)myrand() / RAND_MAX;
       cell->get_dof_indices (local_dof_indices);
       constraints.distribute_local_to_global (local_mat, local_dof_indices,
                                               sparse);
index 045847c04cd845ca3856dc88ffa6c91b9e93ae17..5d2bfa6b6d21270d4b2a7246099a40c57d491af1 100644 (file)
@@ -94,7 +94,7 @@ void test (unsigned int chunk_size)
           if (counter % 42 == 0)
             local_mat(i,j) = 0;
           else
-            local_mat (i,j) = (double)rand() / RAND_MAX;
+            local_mat (i,j) = (double)myrand() / RAND_MAX;
       cell->get_dof_indices (local_dof_indices);
       constraints.distribute_local_to_global (local_mat, local_dof_indices,
                                               sparse);
index 6880b2873b5a3e22d1b3a668043b073c8a23cdd2..5e8ee38ae3264100aeefea108730fa215af0c807 100644 (file)
@@ -57,7 +57,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index 9b209d78dd6cb24dffac67a9ed03108bae35e3c3..463c8bbd85c69949ac41f45714847ced4c7821c6 100644 (file)
@@ -55,7 +55,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index 47d8cd5a7d6e0925bf736075bde932c66d10ff9e..78adf91af32a668de08f6d695cc61fe78907e975 100644 (file)
@@ -69,7 +69,7 @@ void test(std::ostream & /*out*/)
       // refine one-fifth of cells randomly
       std::vector<bool> flags (tr.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index f70ae0d303861eca9ccc87c4afbc8a9f7ecd06f6..cccd24abaf4fb57c4fa7a56ccba4eea9def4faca 100644 (file)
@@ -111,7 +111,7 @@ void test(std::ostream & /*out*/)
       // refine one-fifth of cells randomly
       std::vector<bool> flags (tr.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index c700b92bf6c23867cf27f8eb732e7b23991fadfc..4359953f1849f82c860811a617c66ad9a4e09313 100644 (file)
@@ -64,7 +64,7 @@ void test(std::ostream & /*out*/)
       // refine one fifth of all cells each
       // time (but at least one)
       for (unsigned int i=0; i<tr.n_active_cells() / 5 + 1; ++i)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
 
       // refine tr and tr2
       unsigned int index=0;
index 6162921d86bca725ae7a16a11c1ad904d20b7a05..82a73c0394ff1bb18bbde3b4bb23e693fdedd324 100644 (file)
@@ -71,7 +71,7 @@ void test(std::ostream & /*out*/)
     {
       std::vector<bool> flags (tr.n_active_cells(), false);
       {
-        const unsigned int x = rand() % flags.size();
+        const unsigned int x = myrand() % flags.size();
         deallog << "Refining cell " << x << std::endl;
         flags[x] = true;
       }
index a7cc481cdc11b34bf3b34ad965e2327737a499a4..e9b78a19121d5209355ee4d9200f4c2ea26b68b0 100644 (file)
@@ -83,7 +83,7 @@ void test(std::ostream & /*out*/)
     {
       std::vector<bool> flags (tr.n_active_cells());
       for (unsigned int j=0; j<flags.size(); ++j)
-        flags[j] = (rand() < 0.2*RAND_MAX);
+        flags[j] = (myrand() < 0.2*RAND_MAX);
 
       InterGridMap<Triangulation<dim> > intergrid_map;
       intergrid_map.make_mapping (tr, tr2);
index 013ed860b24d23320c0c4db9aadd55f105e92c35..83a8ad1f1a37c3b2fd6bf9d228ea483351180ca0 100644 (file)
@@ -61,7 +61,7 @@ void test(std::ostream & /*out*/)
       // time (but at least one)
       for (unsigned int i=0; i<tr.n_active_cells() / 5 + 1; ++i)
         {
-          const unsigned int x = rand() % flags.size();
+          const unsigned int x = myrand() % flags.size();
           deallog << "Refining cell " << x << std::endl;
           flags[x] = true;
         }
index 2fb86d4f5ed315acf394bba19fa0723851b88b79..a20ab8393ae3d2c6811c6da92db21657a447b13f 100644 (file)
@@ -69,7 +69,7 @@ void test(std::ostream & /*out*/)
       // refine one-fifth of cells randomly
       std::vector<bool> flags (tr.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index 3e4b4b26f081234d87f8ba53babe62842084c19b..794e1f35422dcc923bea80995c8624979112d2ae 100644 (file)
@@ -66,7 +66,7 @@ void test(std::ostream & /*out*/)
       // refine 10% of cells randomly
       std::vector<bool> flags (tr.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/10 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index fc48d22fee2430e0526898ca8128dabaf7e0ba21..e366a3e87aaa0bf1fcc4f41412456682566af64e 100644 (file)
@@ -70,7 +70,7 @@ void test(std::ostream & /*out*/)
       // refine one-tenth of cells randomly
       std::vector<bool> flags (tr.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/30 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index b067cc3288b15299127a1e5b206e8555f4329777..4b213982cbf9a89c5722ba69a861662dcd3c2bed 100644 (file)
@@ -64,7 +64,7 @@ void test(std::ostream & /*out*/)
       // refine one fifth of all cells each
       // time (but at least one)
       for (unsigned int i=0; i<tr.n_active_cells() / 5 + 1; ++i)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
 
       // refine tr and tr2
       unsigned int index=0;
index 19e01a0634c473e4dedd84cffd024cfbe4f16499..8a50d220c4c78ac51c85f24a6c1b3734d7ce0c2d 100644 (file)
@@ -71,7 +71,7 @@ void test(std::ostream & /*out*/)
     {
       std::vector<bool> flags (tr.n_active_cells(), false);
       {
-        const unsigned int x = rand() % flags.size();
+        const unsigned int x = myrand() % flags.size();
         deallog << "Refining cell " << x << std::endl;
         flags[x] = true;
       }
index f5cbabe0316abac30106ef8ff8b91f7ac85c6cb3..2b41275641402d61e361a210f9be8081d42c0285 100644 (file)
@@ -63,7 +63,7 @@ void test(std::ostream & /*out*/)
     {
       std::vector<bool> flags (tr.n_active_cells());
       for (unsigned int j=0; j<flags.size(); ++j)
-        flags[j] = (rand() < 0.2*RAND_MAX);
+        flags[j] = (myrand() < 0.2*RAND_MAX);
 
       InterGridMap<Triangulation<dim> > intergrid_map;
       intergrid_map.make_mapping (tr, tr2);
index 83b046570a430e566b724b9efc6bbe6dbf1934d5..03b7552abb890d6752ed3e827cf36c043f717732 100644 (file)
@@ -62,7 +62,7 @@ void test(std::ostream & /*out*/)
       // time (but at least one)
       for (unsigned int i=0; i<tr.n_active_cells() / 5 + 1; ++i)
         {
-          const unsigned int x = rand() % flags.size();
+          const unsigned int x = myrand() % flags.size();
           deallog << "Refining cell " << x << std::endl;
           flags[x] = true;
         }
index 3cce2a1a22bc722f6bd6fb1f2303d41d874370d6..36ac26f8e212664d745784400659f56dbc246160 100644 (file)
@@ -63,7 +63,7 @@ void test(std::ostream & /*out*/)
       deallog << "Refining cells ... " << std::endl;
       for (unsigned int i=0; i<tr.n_active_cells() / 50 + 1; ++i)
         {
-          const unsigned int x = rand() % flags.size();
+          const unsigned int x = myrand() % flags.size();
           flags[x] = true;
         }
 
index 19120e7f236b73d8cde0d3d59599d91143d60904..22c373e0d39b4c71e338b4614ce1852ddb6b038e 100644 (file)
@@ -60,7 +60,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index 877391b7a5cc176701e9a0d3c2859d8bbd2afeb1..1aabc661121b62a31de2204d7fffde449a5a2ebf 100644 (file)
@@ -61,7 +61,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index e70e556277aca37232b6c0b3d821c1e1cb7e61ff..a7f382835bb6267ba7c3eecd7e6a9aad694440f5 100644 (file)
@@ -85,7 +85,7 @@ void test(std::ostream & /*out*/)
            cell = tr.begin();
            cell != tr.end(); ++cell)
         {
-          if (cell->has_children() && !(rand() % 3))
+          if (cell->has_children() && !(myrand() % 3))
             for (unsigned int c=0; c<GeometryInfo<dim>::max_children_per_cell; ++c)
               if (!cell->child(c)->has_children())
                 cell->child(c)->set_coarsen_flag();
@@ -94,7 +94,7 @@ void test(std::ostream & /*out*/)
            cell = tr.begin_active();
            cell != tr.end(); ++cell)
         {
-          if (!(rand() % 3))
+          if (!(myrand() % 3))
             {
               cell->clear_coarsen_flag();
               cell->set_refine_flag();
index b4cf3d70232f70984f1c4a7eb6f8d0e26a705dc7..d98354cfcb1c9ae098cd2e95c6c41074e6bbb733 100644 (file)
@@ -293,7 +293,7 @@ public:
       {
         for (unsigned int i=0; i < deg; ++i)
           {
-            double c = ((double) rand()) / ((double) RAND_MAX + 1);
+            double c = ((double) myrand()) / ((double) RAND_MAX + 1);
             coeff[i] = c;
           }
         polys.push_back (Polynomials::Polynomial<double> (coeff));
@@ -518,7 +518,7 @@ int main ()
     // Try arbitrary deformation ...
     for (unsigned int i=0; i < deformation.size (); ++i)
       {
-        double c = ((double) rand()) / ((double) RAND_MAX + 1);
+        double c = ((double) myrand()) / ((double) RAND_MAX + 1);
         deformation (i) = 0.35 * (c - 0.5);
       }
 
index 5a7c267548a806bf510887f314b4ba413da78ec1..6d050878a8862a2cd60d757f18e4c29c7c9b6419 100644 (file)
@@ -86,7 +86,7 @@ double InitializationValues::value (const Point<1> &p,
                                     const unsigned int) const
 {
   const double base = std::pow(p(0), 1./3.);
-  const double random = 2.*rand()/RAND_MAX-1;
+  const double random = 2.*myrand()/RAND_MAX-1;
   return std::max (base+.1*random, 0.);
 }
 
index 44a8714d9ea652e61c52f3a08c95c5868c7f3cae..590e3b71973de07827ea27b38f1542dab7eca607 100644 (file)
@@ -91,7 +91,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 574547fb237e61df21fd9d3938410117b42c31f4..577b2870ffc7bca13d9b2268916104870368d927 100644 (file)
@@ -91,7 +91,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 4dae74d52d3cde6dd056ba022e271fff678305c5..a4526be072085bd6d18834bfa813af0d5860704e 100644 (file)
@@ -87,7 +87,7 @@ test (const unsigned int degree)
 
   Vector<double> tmp1(dofs_per_cell), tmp2(dofs_per_cell);
   for (unsigned int i=0; i<dofs_per_cell; ++i)
-    tmp1(i) = 1.*rand()/RAND_MAX;
+    tmp1(i) = 1.*myrand()/RAND_MAX;
   cg.solve (mass_matrix, tmp2, tmp1, PreconditionIdentity());
 
   deallog << "Degree=" << degree
index 909192d499a598291dee56bb1869bc2b4f1b8b45..5f2e30610d1747c5afe03da2b3a992d4297e1f56 100644 (file)
@@ -78,7 +78,7 @@ test (const unsigned int degree)
 
   Vector<double> tmp1(dofs_per_cell), tmp2(dofs_per_cell);
   for (unsigned int i=0; i<dofs_per_cell; ++i)
-    tmp1(i) = 1.*rand()/RAND_MAX;
+    tmp1(i) = 1.*myrand()/RAND_MAX;
   cg.solve (mass_matrix, tmp2, tmp1, PreconditionIdentity());
 
   deallog << "Degree=" << degree
index 829acdb2d137851c201b94c8fd4c0248fcdcb09c..9218074434b60c3493b00794aa6994783c83aa6d 100644 (file)
@@ -293,7 +293,7 @@ public:
       {
         for (unsigned int i=0; i < deg; ++i)
           {
-            double c = ((double) rand()) / ((double) RAND_MAX + 1);
+            double c = ((double) myrand()) / ((double) RAND_MAX + 1);
             coeff[i] = c;
           }
         polys.push_back (Polynomials::Polynomial<double> (coeff));
@@ -523,7 +523,7 @@ int main ()
     // Try arbitrary deformation ...
     for (unsigned int i=0; i < deformation.size (); ++i)
       {
-        double c = ((double) rand()) / ((double) RAND_MAX + 1);
+        double c = ((double) myrand()) / ((double) RAND_MAX + 1);
         deformation (i) = 0.35 * (c - 0.5);
       }
 
index 643189e1a9f103fabb497fdf1ea1fbba96398730..1b6cc0c58a324f7c1692b39f3dd770dc0bc26370 100644 (file)
@@ -291,7 +291,7 @@ int main (int /*argc*/, char **/*argv*/)
 
   // Fill solution vector with random values between 0 and 1.
   for (unsigned int i = 0; i < dof_handler->n_dofs (); ++i)
-    solution(i) = (double) rand() / (double) RAND_MAX;
+    solution(i) = (double) myrand() / (double) RAND_MAX;
 
   // Now check if the function is continuous in normal
   // direction.
index 98969008de09761de69af67c748ca33250c154b6..125f6de7ff78ecde521bdd2e3f759cf155ceab4b 100644 (file)
@@ -82,7 +82,7 @@ check ()
   cell = dof_handler.begin_active(),
   endc = dof_handler.end();
   for (; cell!=endc; ++cell)
-    cell->set_active_fe_index (rand() % fe.size());
+    cell->set_active_fe_index (myrand() % fe.size());
 
   dof_handler.distribute_dofs (fe);
 
index 94649a1c01edc04c369fc501567e63c84099fc36..a5adcfa9982300db2db8fb97bafed83def5f6b3f 100644 (file)
@@ -82,7 +82,7 @@ check ()
   cell = dof_handler.begin_active(),
   endc = dof_handler.end();
   for (; cell!=endc; ++cell)
-    cell->set_active_fe_index (rand() % fe.size());
+    cell->set_active_fe_index (myrand() % fe.size());
 
   dof_handler.distribute_dofs (fe);
 
index 5740637f032c75df3499efb7fd40898c9b9a79b2..b688e5db7f5391a318737d7abb3f6b2ca7ada6b6 100644 (file)
@@ -70,7 +70,7 @@ void do_check (const Triangulation<dim> &triangulation,
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof_handler.begin_active();
        cell != dof_handler.end(); ++cell)
-    cell->set_active_fe_index (rand() % fe.size());
+    cell->set_active_fe_index (myrand() % fe.size());
   dof_handler.distribute_dofs (fe);
 
   deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
index 6fd1c1c1361d0e913c0c024836f8320a9571cf38..a868290e1c7eedbf192690eb45750946cc585ff3 100644 (file)
@@ -71,7 +71,7 @@ void test ()
   typename hp::DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active (),
                                                      endc = dof_handler.end ();
   for (; cell != endc; ++cell)
-    cell->set_active_fe_index (rand() % fe.size());
+    cell->set_active_fe_index (myrand() % fe.size());
 
   dof_handler.distribute_dofs (fe);
 
@@ -113,7 +113,7 @@ int main ()
   // same value it has in
   // hp_hanging_nodes_02
   for (unsigned int i=0; i<64; ++i)
-    rand();
+    myrand();
   test<3> ();
 
   return 0;
index 7f807e1b4e213da1c2922651f1322fca9699ea07..230627f4fe86b0778c85d0b4a9dc2ccaf6edb838 100644 (file)
@@ -68,7 +68,7 @@ void test ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof_handler.begin_active();
        cell != dof_handler.end(); ++cell)
-    cell->set_active_fe_index (rand() % fe.size());
+    cell->set_active_fe_index (myrand() % fe.size());
   dof_handler.distribute_dofs (fe);
 
   // loop over all lines and make sure that
index ba5beeddc55dcd8a62bf791bba514f3c819e1e6d..9302e2e068be7e4e686640f7ca5cf69aa21c1625 100644 (file)
@@ -80,7 +80,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 801a3d54641bcb6b0cfc446d5eb14c225a1f3dda..362d2fa7301ba9f57b73139226ca1b15ba592b23 100644 (file)
@@ -81,7 +81,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 047b3644340db4390e9fb79cbfb5be189847359f..b4bc3c017bf48f6145999ce89f5afe229cca72fd 100644 (file)
@@ -82,7 +82,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index a80612418e52815e9086fa5f75b43140ab249839..dfcf4b1bc9524ecc8af419f9ce6818811eb14dad 100644 (file)
@@ -83,7 +83,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index e822e47fc042c1249fe66db40e5dc49aea4f958d..485f897043551aa070aaaa13e7c92b5cfaaa7ffd 100644 (file)
@@ -79,7 +79,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 504ba3a7c93464148aecaf21c6364fc36473d264..45701b331ae78b923aedb7bad6ccb68a5a6efbbd 100644 (file)
@@ -80,7 +80,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 58d112bfcb3cd844f1cc8f1196c2ca44c469aa97..bd28208994238c1cfc1178c570db6585190e7549 100644 (file)
@@ -81,7 +81,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index daf06c12ff34b743cc83c0f53616e275c8779ee5..7ffe72beafc2add560da0f7b3aeca120cea01bb4 100644 (file)
@@ -82,7 +82,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 6c18737d2c129b1b91813d9abdbfb895b7788f82..99b4c53635a8a7d6ab9f9a1414783e46d76a92d4 100644 (file)
@@ -77,7 +77,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 4d9c020063d1f45069acc22dc0f0dcf7c5c8f374..5c9a084566cfb4173cccf0f0391c2363d7703170 100644 (file)
@@ -77,7 +77,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 6baee806256f3db883c603b5fa1778d09bc22acb..0abe9282307b95bfc9a0642bc7f7e938f331c75e 100644 (file)
@@ -80,7 +80,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 2bf48dd14d52f0a491f3b4b972f9cdbc58ab0806..0a574b30011cde1e5eee27a8fb4f90e59537109c 100644 (file)
@@ -81,7 +81,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index cacd8141d786cf8fc80903cb093fc721cd60673f..8ea98aa19ddbc9a389928906ebf419cb70f33fb5 100644 (file)
@@ -82,7 +82,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 378b709cc0f4194c3b76d47309e2c6c97bde1fed..32102a9a76568d0346ffec77764b6defd1abc6b7 100644 (file)
@@ -83,7 +83,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 49774ccf71becebea206e211481e9504703b763c..1efcbfcb9ef7e8d3274cb1543cca3e158aeae0ec 100644 (file)
@@ -79,7 +79,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 59950fc5c1623fd739948793970cddac7e0bdec6..c53a90d16955c0c2b547d3ddc21f6124fb61491e 100644 (file)
@@ -82,7 +82,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 170dde18a32983d0d7f4c7ab91fce366218a1558..5b1016a6ac6b8e5ebba25e14f35915940281ec41 100644 (file)
@@ -81,7 +81,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index f2fac3a4c4a9ef5633f01f4e92c5731ee0e02f08..deb080e399720584bea8444a593e0a38be8d48d4 100644 (file)
@@ -82,7 +82,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index c1236b1ba476e5469ce0ff55ba8fd56bc9307b85..baea9e0be39bdb174ecf8c9298e539abcaaf9fa2 100644 (file)
@@ -75,7 +75,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index fb2937073ad6547939156d8aa7d237253e97c87b..8df741b04753f887f33ba32950f97eb153adefcc 100644 (file)
@@ -77,7 +77,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 480401e36c1cb52031d29391da59f7e72ecc0760..d073d58b4e0b933f22bddf1a8c89159a6c58c380 100644 (file)
@@ -77,7 +77,7 @@ check ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active();
        cell != dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index f62309afb70e4d8fa47addbac941c7384ab2666e..f1c2fe5df382d8c4ad01f83eacf0ee3da5d6d36a 100644 (file)
@@ -60,7 +60,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index 2aa6066adf88ee67eb95e5b7f0dcb95b7a623b9c..262c077619b3b4b171d888b4695a6e34552082c5 100644 (file)
@@ -57,7 +57,7 @@ void test ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof_handler.begin_active();
        cell != dof_handler.end(); ++cell)
-    cell->set_active_fe_index (rand() % fe_collection.size());
+    cell->set_active_fe_index (myrand() % fe_collection.size());
 
   dof_handler.distribute_dofs(fe_collection);
 
index f50d40925f26c6dd0ac0831f0ce0cf1cb22d8eda..959e727aabaffaa43cc115018a13616bddd2b3bd 100644 (file)
@@ -92,7 +92,7 @@ void run (bool random_p,
     {
       for (; cell != endc; ++cell)
         {
-          cell->set_active_fe_index ((int)(4.0 * (double) rand() / (double) RAND_MAX));
+          cell->set_active_fe_index ((int)(4.0 * (double) myrand() / (double) RAND_MAX));
         }
     }
   else
index e809f7a5233d7fd96010ddfaa06b7b18ed9edb52..91235de444098eeaf1c6c6c18882bbc4dba80581 100644 (file)
@@ -67,7 +67,7 @@ void test ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof_handler.begin_active();
        cell != dof_handler.end(); ++cell)
-    cell->set_active_fe_index (rand() % fe_collection.size());
+    cell->set_active_fe_index (myrand() % fe_collection.size());
 
   dof_handler.distribute_dofs(fe_collection);
 
index 14cc0750840173dc0c6675f5815ee18455c8527f..e0ebb1c5af7d6684721303a21e08c39bfbea78f3 100644 (file)
@@ -67,7 +67,7 @@ void test ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof_handler.begin_active();
        cell != dof_handler.end(); ++cell)
-    cell->set_active_fe_index (rand() % fe_collection.size());
+    cell->set_active_fe_index (myrand() % fe_collection.size());
 
   dof_handler.distribute_dofs(fe_collection);
 
index 0b0542090d51c52f45b31fe74e85ac2fd957a9e1..315dd670402521e7507293cff0effe74891eeba0 100644 (file)
@@ -150,7 +150,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 337b259e9ede5b7aa3ad8b8193e5da9aff9bca8e..28f54d287caf49b5f9f84b4fd3aa757cdf47d95d 100644 (file)
@@ -136,7 +136,7 @@ void test ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof_handler.begin_active();
        cell != dof_handler.end(); ++cell)
-    cell->set_active_fe_index (rand() % fe_collection.size());
+    cell->set_active_fe_index (myrand() % fe_collection.size());
 
   dof_handler.distribute_dofs(fe_collection);
 
index 7483cfe0dbeaba381375a3617c6325139d7bba27..e747cd5fbe545858e08cb484d2cd663de6a5a28a 100644 (file)
@@ -56,7 +56,7 @@ void test ()
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof_handler.begin_active();
        cell != dof_handler.end(); ++cell)
-    cell->set_active_fe_index (rand() % fe_collection.size());
+    cell->set_active_fe_index (myrand() % fe_collection.size());
 
   dof_handler.distribute_dofs(fe_collection);
 
index 6898701e4235b6fb0d84b5b614439b380c8eca20..64b94d10f345b47abc8d9d655b08de800307efa0 100644 (file)
@@ -105,11 +105,11 @@ void transfer(std::ostream &out)
         if (counter < 15)
           cell->set_active_fe_index(1);
         else
-          cell->set_active_fe_index(rand()%max_degree);
+          cell->set_active_fe_index(myrand()%max_degree);
         if (counter < 15)
           celldg->set_active_fe_index(1);
         else
-          celldg->set_active_fe_index(rand()%max_degree);
+          celldg->set_active_fe_index(myrand()%max_degree);
       }
   }
 
@@ -140,9 +140,9 @@ void transfer(std::ostream &out)
     {
       if (counter > 120)
         cell->set_coarsen_flag();
-      else if (rand() % 3 == 0)
+      else if (myrand() % 3 == 0)
         cell->set_refine_flag();
-      else if (rand() % 3 == 3)
+      else if (myrand() % 3 == 3)
         cell->set_coarsen_flag();
     }
 
@@ -164,11 +164,11 @@ void transfer(std::ostream &out)
         if (counter > 20 && counter < 90)
           cell->set_active_fe_index(0);
         else
-          cell->set_active_fe_index(rand()%max_degree);
+          cell->set_active_fe_index(myrand()%max_degree);
         if (counter > 20 && counter < 90)
           celldg->set_active_fe_index(0);
         else
-          celldg->set_active_fe_index(rand()%max_degree);
+          celldg->set_active_fe_index(myrand()%max_degree);
       }
   }
 
index 030f1736c98a96451c9ed41cf52f9249d6bfe2a9..68a219c55b82b120dc46fe75e1c829ca98b8e518 100644 (file)
@@ -110,7 +110,7 @@ void LaplaceProblem::make_grid_and_dofs ()
   unsigned int cell_no = 0;
   for (; cell != endc; ++cell)
     {
-      cell->set_active_fe_index (rand() % fe.size());
+      cell->set_active_fe_index (myrand() % fe.size());
       deallog << "Cell " << cell << " has fe_index=" << cell->active_fe_index()
               << std::endl;
       ++cell_no;
index 958ca6cd64a2f3180dad6dbf15efd38396ce14e2..716104031500695af73b9ebb6c816c0a9965232e 100644 (file)
@@ -109,7 +109,7 @@ void LaplaceProblem::make_grid_and_dofs ()
   unsigned int cell_no = 0;
   for (; cell != endc; ++cell)
     {
-      cell->set_active_fe_index (rand() % fe.size());
+      cell->set_active_fe_index (myrand() % fe.size());
       deallog << "Cell " << cell << " has fe_index=" << cell->active_fe_index()
               << std::endl;
       ++cell_no;
index 90f8ca7e03dad6a4186cddea9406792e1d0484d9..8476ea4afd550723b47821c65d964cff912f77c4 100644 (file)
@@ -91,7 +91,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index ae7c568db184805a8c3dc70a5f22c03ee0a3660e..d7be80fb7d5aa1ca4da1c29cca76146766f3953d 100644 (file)
@@ -90,7 +90,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 8cf44d7372fca5d718772c8fe761659484eaa0b9..79ccf747f1596e46b4ed64d701518b9707557166 100644 (file)
@@ -89,7 +89,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 0d12301c535e0febe09ffa4a750321f074ad8178..131acc3168b448d1c9cd2058490063d38f7f796a 100644 (file)
@@ -92,7 +92,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 4ee494d91d889454686401a7d7aace5dee1bedea..336e53f4a50e46c3523ffa55e9c5353324c23d0f 100644 (file)
@@ -90,7 +90,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 3e13f2f45218dd778231346dd20d16bd4b0e6ac2..85005a1a87920ae2a0f5f5480b0c36a6d2e7c6fa 100644 (file)
@@ -68,7 +68,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 43c7b066087bcd510e14431fec6f494873c9801a..29720607b1552523331376d485f1fc9d624fa843 100644 (file)
@@ -68,7 +68,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 91d0197aa73a45790fa2662ac3ebb7082f7d6439..398549e9fe21384b9738b67b473614e8bedd5377 100644 (file)
@@ -91,7 +91,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 7fd7dda1f09323263d73c49d334d856283872612..e703fac95af0e6a2f5695be6b1430a4765a143f6 100644 (file)
@@ -90,7 +90,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 8326444464f10991934eb0e75a7b5e75f585b3c1..a27d07c4447e3c0df611040e89b0e8b60885a610 100644 (file)
@@ -89,7 +89,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index 306e800de00822e48808ba21de449ac3c49f5111..3a4f215c83cbbe2862a8520e90c05188438aac1c 100644 (file)
@@ -92,7 +92,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index d2bdaf3d1a0eb567e9055ee41d27f5d93888efa7..40d54f393b9b8bbd0b6e7377cd78492bda27d3a2 100644 (file)
@@ -90,7 +90,7 @@ check ()
   hp::DoFHandler<dim> dof(tr);
   for (typename hp::DoFHandler<dim>::active_cell_iterator
        cell = dof.begin_active(); cell!=dof.end(); ++cell)
-    cell->set_active_fe_index (rand() % element.size());
+    cell->set_active_fe_index (myrand() % element.size());
 
   dof.distribute_dofs(element);
 
index a5620a12f9ec819e9bb72822ec76933e3730d4df..0876f633d74fa13858f7d40663e9866f2d79723c 100644 (file)
@@ -37,7 +37,7 @@ void random_matrix(FullMatrix<double> &A)
   for (unsigned int i=0; i<A.m(); ++i)
     for (unsigned int j=0; j<A.n(); ++j)
       {
-        double rnd = rand();
+        double rnd = myrand();
         rnd /= RAND_MAX;
         A(i,j) = (i==j) ? A.m()+rnd : rnd;
       }
index 22083f23b31dc84e13aac1ea1cf69b0b2e4047a6..9a7e1d269b874c27759214f2475e12ca91a71b6c 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) = rand();
+        A(i,j) = myrand();
       for (unsigned int j=0; j<m; ++j)
         {
-          B(i,j) = Bt(j,i) = rand();
-          D(j,i) = Dt(i,j) = rand();
+          B(i,j) = Bt(j,i) = myrand();
+          D(j,i) = Dt(i,j) = myrand();
         }
     }
   for (unsigned int i=0; i<m; ++i)
     for (unsigned int j=0; j<m; ++j)
-      C(i,j) = rand();
+      C(i,j) = myrand();
 
   // Compare first Schur complement
   // with mmult.
index fb94f169432c29d2909fc43178607ed1d967cdb1..49fe200b8a5b96ac9d4a7282f7b2645a83db2e64 100644 (file)
@@ -36,7 +36,7 @@ void test (unsigned int variant)
   FullMatrix<number> matrix(n, n);
   for (unsigned int i=0; i<n; ++i)
     for (unsigned int j=0; j<n; ++j)
-      matrix(i,j) = -0.1 + 0.2 * rand()/RAND_MAX;
+      matrix(i,j) = -0.1 + 0.2 * myrand()/RAND_MAX;
 
   // put diagonal entries of different strengths. these are very challenging
   // for GMRES and will usually take a lot of iterations until the Krylov
index 7ff9edd486a3f71c7c7cb34320234d2cd2234a83..b6830f91a428a5e2e1f832d340d6c04d9db0e172 100644 (file)
@@ -35,7 +35,7 @@ void test (unsigned int variant)
   FullMatrix<number> matrix(n, n);
   for (unsigned int i=0; i<n; ++i)
     for (unsigned int j=0; j<n; ++j)
-      matrix(i,j) = -0.1 + 0.2 * rand()/RAND_MAX;
+      matrix(i,j) = -0.1 + 0.2 * myrand()/RAND_MAX;
 
   // put diagonal entries of different strengths. these are very challenging
   // for GMRES and will usually take a lot of iterations until the Krylov
index 0baf1f97856e3e1cb439d7ee7abbf6bcb8d442dc..23982d6cd85c720694d6d34bce6e44257be9be2a 100644 (file)
@@ -55,7 +55,7 @@ check()
 
   Vector<double> in (size), out(size);
   for (unsigned int i=0; i<size; ++i)
-    in(i) = (double)rand()/RAND_MAX;
+    in(i) = (double)myrand()/RAND_MAX;
 
   PreconditionChebyshev<FullMatrixModified,Vector<double> > prec;
   PreconditionChebyshev<FullMatrixModified,Vector<double> >::AdditionalData
index 6b17880f8cf58d74423b74dcb65f3c5dff56e64a..f91a5dddbbafd1b956bd0e586cab0d53476ac668 100644 (file)
@@ -103,7 +103,7 @@ int main()
           for (unsigned int i=0; i<3; ++i)
             {
               for (unsigned int j=0; j<dim; ++j)
-                v(j) = 1. * rand()/RAND_MAX;
+                v(j) = 1. * myrand()/RAND_MAX;
 
               A.vmult (tmp1, v);
               ilu.vmult (tmp2, tmp1);
index 9bdab5450c0378079e8d32e34e659d844597dae2..8044a18a964528d7a86d5b146dbc8a5dfa3df988 100644 (file)
@@ -104,7 +104,7 @@ int main()
           for (unsigned int i=0; i<3; ++i)
             {
               for (unsigned int j=0; j<dim; ++j)
-                v(j) = 1. * rand()/RAND_MAX;
+                v(j) = 1. * myrand()/RAND_MAX;
 
               A.Tvmult (tmp1, v);
               ilu.Tvmult (tmp2, tmp1);
index 26a45c21abce5a2e0de90b7580148ffd6cfe4892..c9db6880d4572633ca4eaec52b4b790efdc5ec21 100644 (file)
@@ -56,9 +56,9 @@ void test (const unsigned int n)
   for (unsigned int i=0; i<n; ++i)
     {
       for (unsigned int j=0; j<n; ++j)
-        A.set(i,j,rand());
+        A.set(i,j,myrand());
       for (unsigned int j=0; j<n; ++j)
-        B.set(i,j,rand());
+        B.set(i,j,myrand());
     }
 
   // now form the matrix-matrix product and
@@ -67,7 +67,7 @@ void test (const unsigned int n)
 
   Vector<double> x(n), y(n), z(n), tmp(n);
   for (unsigned int j=0; j<n; ++j)
-    x(j) = rand();
+    x(j) = myrand();
 
   // then test for correctness
   C.vmult (y, x);
index 8d5fe440188f0b71c1ad5d25a305e0a05011c76e..83aff6f4e809d5374a4dfb3fbf2abef479f1b9c7 100644 (file)
@@ -56,14 +56,14 @@ void test (const unsigned int n)
   for (unsigned int i=0; i<n; ++i)
     {
       for (unsigned int j=0; j<n; ++j)
-        A.set(i,j,rand());
+        A.set(i,j,myrand());
       for (unsigned int j=0; j<n; ++j)
-        B.set(i,j,rand());
+        B.set(i,j,myrand());
     }
 
   Vector<double> v(n);
   for (unsigned int j=0; j<n; ++j)
-    v(j) = rand();
+    v(j) = myrand();
 
   // now form the matrix-matrix product and
   // initialize a test rhs
@@ -71,7 +71,7 @@ void test (const unsigned int n)
 
   Vector<double> x(n), y(n), z(n), tmp(n);
   for (unsigned int j=0; j<n; ++j)
-    x(j) = rand();
+    x(j) = myrand();
 
   // then test for correctness
   C.vmult (y, x);
index 1a4f9524431bd753614d54e3aef26c58fb18303d..de2070609e4be34aeefb95842718551baa6b5416 100644 (file)
@@ -56,9 +56,9 @@ void test (const unsigned int n)
   for (unsigned int i=0; i<n; ++i)
     {
       for (unsigned int j=0; j<n; ++j)
-        A.set(i,j,rand());
+        A.set(i,j,myrand());
       for (unsigned int j=0; j<n; ++j)
-        B.set(i,j,rand());
+        B.set(i,j,myrand());
     }
 
   // now form the matrix-matrix product and
@@ -67,7 +67,7 @@ void test (const unsigned int n)
 
   Vector<double> x(n), y(n), z(n), tmp(n);
   for (unsigned int j=0; j<n; ++j)
-    x(j) = rand();
+    x(j) = myrand();
 
   // then test for correctness
   C.vmult (y, x);
index ea7f74a9ae5b02396722a2ba8660fe96fac8f347..fc24fdff979615ce1c141d95c3b918ea57120482 100644 (file)
@@ -56,14 +56,14 @@ void test (const unsigned int n)
   for (unsigned int i=0; i<n; ++i)
     {
       for (unsigned int j=0; j<n; ++j)
-        A.set(i,j,rand());
+        A.set(i,j,myrand());
       for (unsigned int j=0; j<n; ++j)
-        B.set(i,j,rand());
+        B.set(i,j,myrand());
     }
 
   Vector<double> v(n);
   for (unsigned int j=0; j<n; ++j)
-    v(j) = rand();
+    v(j) = myrand();
 
   // now form the matrix-matrix product and
   // initialize a test rhs
@@ -71,7 +71,7 @@ void test (const unsigned int n)
 
   Vector<double> x(n), y(n), z(n), tmp(n);
   for (unsigned int j=0; j<n; ++j)
-    x(j) = rand();
+    x(j) = myrand();
 
   // then test for correctness
   C.vmult (y, x);
index f71321fd7f89d39cb526c8d66b1a9b68e644dcd7..f1a03a00da317a488b67166aa62ff4356d810f5f 100644 (file)
@@ -105,7 +105,7 @@ int main()
           for (unsigned int i=0; i<3; ++i)
             {
               for (unsigned int j=0; j<dim; ++j)
-                v(j) = 1. * rand()/RAND_MAX;
+                v(j) = 1. * myrand()/RAND_MAX;
 
               A.vmult (tmp1, v);
               mic.vmult (tmp2, tmp1);
index b7faa16ac3b1955b8f81e847516a7104cd6ee353..0c5cd1fafe44006486333fc1550db037ada19c11 100644 (file)
@@ -34,10 +34,10 @@ void check_norms ()
 {
   for (unsigned int test=0; test<20; ++test)
     {
-      const unsigned int size = rand() % 100000;
+      const unsigned int size = myrand() % 100000;
       Vector<number> vec (size);
       for (unsigned int i=0; i<size; ++i)
-        vec(i) = static_cast<number>(rand())/static_cast<number>(RAND_MAX);
+        vec(i) = static_cast<number>(myrand())/static_cast<number>(RAND_MAX);
       const typename Vector<number>::real_type norm = vec.l2_norm();
       for (unsigned int i=0; i<30; ++i)
         Assert (vec.l2_norm() == norm, ExcInternalError());
index 071959c83d84c7ce0218412c8c1523c9098051a7..6eebe79bd1ba5d3a240a0edb43ef457c73e0d4a1 100644 (file)
@@ -96,7 +96,7 @@ void sub_test()
         {
           if (constraints.is_constrained(i))
             continue;
-          const double entry = rand()/(double)RAND_MAX;
+          const double entry = myrand()/(double)RAND_MAX;
           in_dist(i) = entry;
         }
 
index b19a94c4beb0363e827bafe77fdaf3d00c350632..d908646d282c485a1243b54b341d20343f37c922 100644 (file)
@@ -36,7 +36,7 @@ void test()
   for (unsigned int i=0; i<(M+1)/2; ++i)
     for (unsigned int j=0; j<N; ++j)
       {
-        shape[i][j] = -1. + 2. * (double)rand()/RAND_MAX;
+        shape[i][j] = -1. + 2. * (double)myrand()/RAND_MAX;
         if (type == 1)
           shape[M-1-i][N-1-j] = -shape[i][j];
         else
@@ -53,7 +53,7 @@ void test()
 
   double x[N], x_ref[N], y[M], y_ref[M];
   for (unsigned int i=0; i<N; ++i)
-    x[i] = (double)rand()/RAND_MAX;
+    x[i] = (double)myrand()/RAND_MAX;
 
   // compute reference
   for (unsigned int i=0; i<M; ++i)
@@ -82,7 +82,7 @@ void test()
 
 
   for (unsigned int i=0; i<M; ++i)
-    y[i] = (double)rand()/RAND_MAX;
+    y[i] = (double)myrand()/RAND_MAX;
 
   // compute reference
   for (unsigned int i=0; i<N; ++i)
index 2eab66476dede73dbda20261a497ac826eb4b9e9..a4b78a84fbc60e7fa18096322564b69b8c92b697 100644 (file)
@@ -37,7 +37,7 @@ void test()
   for (unsigned int i=0; i<(M+1)/2; ++i)
     for (unsigned int j=0; j<N; ++j)
       {
-        shape[i][j] = -1. + 2. * (double)rand()/RAND_MAX;
+        shape[i][j] = -1. + 2. * (double)myrand()/RAND_MAX;
         if (type == 1)
           shape[M-1-i][N-1-j] = -shape[i][j];
         else
@@ -67,7 +67,7 @@ void test()
 
   double x[N], x_ref[N], y[M], y_ref[M];
   for (unsigned int i=0; i<N; ++i)
-    x[i] = (double)rand()/RAND_MAX;
+    x[i] = (double)myrand()/RAND_MAX;
 
   // compute reference
   for (unsigned int i=0; i<M; ++i)
@@ -88,7 +88,7 @@ void test()
 
 
   for (unsigned int i=0; i<M; ++i)
-    y[i] = (double)rand()/RAND_MAX;
+    y[i] = (double)myrand()/RAND_MAX;
 
   // compute reference
   for (unsigned int i=0; i<N; ++i)
index a5b2dd1b90c2f0cc3f1fe810a8664f6cfbe45098..af8131c811d505bd3b6b9ae9fb4ed482e8cdb9fb 100644 (file)
@@ -120,7 +120,7 @@ void test ()
     {
       if (constraints.is_constrained(i))
         continue;
-      const double entry = rand()/(double)RAND_MAX;
+      const double entry = myrand()/(double)RAND_MAX;
       solution(i) = entry;
     }
   constraints.distribute(solution);
index 866eea77c355bf39aaecddb3c7a5beb8d87b2703..20e8195b6a8edcca508fa16b3638f27149f4d59b 100644 (file)
@@ -67,7 +67,7 @@ void test ()
     {
       if (constraints.is_constrained(i))
         continue;
-      const double entry = rand()/(double)RAND_MAX;
+      const double entry = myrand()/(double)RAND_MAX;
       solution(i) = entry;
     }
 
index 5dec4bd27e6117257015485392d0e0c6bbc7ab4c..8b0c421dd279a051a572d82a53109da0c45a1398 100644 (file)
@@ -249,7 +249,7 @@ void test ()
       {
         if (constraints[no]->is_constrained(i))
           continue;
-        const double entry = rand()/(double)RAND_MAX;
+        const double entry = myrand()/(double)RAND_MAX;
         src[no](i) = entry;
       }
 
index 328ae91880f81eb1fe5f3a1d098ce5f1e169f7d5..289f54dc6aaf2599f4deba3fb32676106d3c8001 100644 (file)
@@ -300,7 +300,7 @@ void test ()
       {
         if (constraints[no]->is_constrained(i))
           continue;
-        const double entry = rand()/(double)RAND_MAX;
+        const double entry = myrand()/(double)RAND_MAX;
         src[no](i) = entry;
       }
 
index 01601f2944368d11b0db341e80ea43a3a36064ac..e360aba21d6bbd8ffd3e535a2ad7fea8ffa0a2a5 100644 (file)
@@ -123,7 +123,7 @@ void test ()
     {
       if (constraints.is_constrained(i))
         continue;
-      const double entry = rand()/(double)RAND_MAX;
+      const double entry = myrand()/(double)RAND_MAX;
       solution(i) = entry;
     }
   constraints.distribute(solution);
index 881125ad796eba688cc86ad8e6ee92bda5e9b4e6..d99ffd984231b3add6116f190635a7e8433fae8f 100644 (file)
@@ -89,7 +89,7 @@ void test ()
     {
       if (constraints.is_constrained(i))
         continue;
-      const double entry = rand()/(double)RAND_MAX;
+      const double entry = myrand()/(double)RAND_MAX;
       solution(i) = entry;
     }
   constraints.distribute(solution);
index 6bd47df328d29f831185fffc22203abe37305df7..27665233d6bc29ef396a13161bc1e8fcabdfe714 100644 (file)
@@ -169,7 +169,7 @@ void test ()
   // create vector with random entries
   for (unsigned int i=0; i<dof.n_dofs(); ++i)
     {
-      const double entry = rand()/(double)RAND_MAX;
+      const double entry = myrand()/(double)RAND_MAX;
       solution_dist(i) = entry;
     }
 
index 378006b9e15ed76023561e247ea51dd45ed97400..4da355bb68f771f71b201dc365a5023394161dc2 100644 (file)
@@ -120,7 +120,7 @@ void do_test (const DoFHandler<dim> &dof,
     {
       if (constraints.is_constrained(i))
         continue;
-      const double entry = rand()/(double)RAND_MAX;
+      const double entry = myrand()/(double)RAND_MAX;
       solution(i) = entry;
     }
 
index 313a249d87c9b33796bbda3b9b4be619169b3499..096b293c6d0d4428c718655c3e95a5db94efe655 100644 (file)
@@ -107,9 +107,9 @@ operator () (const MatrixFree<dim,Number> &data,
           // and their gradients
           for (unsigned int q=0; q<n_q_points; ++q)
             {
-              values[q][j] = rand()/(double)RAND_MAX;
+              values[q][j] = myrand()/(double)RAND_MAX;
               for (unsigned int d=0; d<dim; ++d)
-                gradients[q*dim+d][j] = -1. + 2. * (rand()/(double)RAND_MAX);
+                gradients[q*dim+d][j] = -1. + 2. * (myrand()/(double)RAND_MAX);
             }
           fe_val.reinit (data.get_cell_iterator(cell,j));
           data.get_cell_iterator(cell,j)->get_dof_indices(dof_indices);
index 2f3f7fe0bb9b3d11d5ac2e481253f1a3d9c4ab78..904e9bdbf86695f8eceea29a1cf9b122812bacba 100644 (file)
@@ -123,9 +123,9 @@ operator () (const MatrixFree<dim,Number> &data,
           // and their gradients
           for (unsigned int q=0; q<n_q_points0; ++q)
             {
-              values0[q][j] = rand()/(double)RAND_MAX;
+              values0[q][j] = myrand()/(double)RAND_MAX;
               for (unsigned int d=0; d<dim; ++d)
-                gradients0[q*dim+d][j] = -1. + 2. * (rand()/(double)RAND_MAX);
+                gradients0[q*dim+d][j] = -1. + 2. * (myrand()/(double)RAND_MAX);
             }
           fe_val0.reinit (data.get_cell_iterator(cell,j,0));
           data.get_cell_iterator(cell,j,0)->get_dof_indices(dof_indices0);
@@ -149,9 +149,9 @@ operator () (const MatrixFree<dim,Number> &data,
 
           for (unsigned int q=0; q<n_q_points1; ++q)
             {
-              values1[q][j] = rand()/(double)RAND_MAX;
+              values1[q][j] = myrand()/(double)RAND_MAX;
               for (unsigned int d=0; d<dim; ++d)
-                gradients1[q*dim+d][j] = -1. + 2. * (rand()/(double)RAND_MAX);
+                gradients1[q*dim+d][j] = -1. + 2. * (myrand()/(double)RAND_MAX);
             }
           for (unsigned int i=0; i<dofs_per_cell1; ++i)
             {
index 2cff7afd65f2324ae407f9532aa1e002b0d1bbde..7a182c08086f32350084117734a3960e8086a548 100644 (file)
@@ -126,9 +126,9 @@ operator () (const MatrixFree<dim,Number> &data,
           // and their gradients
           for (unsigned int q=0; q<n_q_points0; ++q)
             {
-              values0[q][j] = rand()/(double)RAND_MAX;
+              values0[q][j] = myrand()/(double)RAND_MAX;
               for (unsigned int d=0; d<dim; ++d)
-                gradients0[q*dim+d][j] = -1. + 2. * (rand()/(double)RAND_MAX);
+                gradients0[q*dim+d][j] = -1. + 2. * (myrand()/(double)RAND_MAX);
             }
           fe_val0.reinit (data.get_cell_iterator(cell,j,0));
           data.get_cell_iterator(cell,j,0)->get_dof_indices(dof_indices0);
@@ -152,9 +152,9 @@ operator () (const MatrixFree<dim,Number> &data,
 
           for (unsigned int q=0; q<n_q_points1; ++q)
             {
-              values1[q][j] = rand()/(double)RAND_MAX;
+              values1[q][j] = myrand()/(double)RAND_MAX;
               for (unsigned int d=0; d<dim; ++d)
-                gradients1[q*dim+d][j] = -1. + 2. * (rand()/(double)RAND_MAX);
+                gradients1[q*dim+d][j] = -1. + 2. * (myrand()/(double)RAND_MAX);
             }
           for (unsigned int i=0; i<dofs_per_cell1; ++i)
             {
index cd920535ae64446a71e79ac6fa2d9a9a1c3daa8d..6be8ed73219e12d78afd9a0f488681151f459ffd 100644 (file)
@@ -129,7 +129,7 @@ void test ()
         owned_set.nth_index_in_set (i);
       if (constraints.is_constrained(glob_index))
         continue;
-      in.local_element(i) = (double)rand()/RAND_MAX;
+      in.local_element(i) = (double)myrand()/RAND_MAX;
     }
 
   mf.vmult (out, in);
index 4b32389011f0957f593c8c602112a1ca3c05f2fe..daedda39233fbb8e9adbb9dee1b85c8ae0cd52af 100644 (file)
@@ -122,7 +122,7 @@ void test ()
         owned_set.nth_index_in_set (i);
       if (constraints.is_constrained(glob_index))
         continue;
-      in.local_element(i) = (double)rand()/RAND_MAX;
+      in.local_element(i) = (double)myrand()/RAND_MAX;
     }
 
   mf.vmult (ref, in);
index b159c5c35a5db39569731d447230dfb6d3fff0ca..60b18c3a94242389d27f22d7461812ee236a3278 100644 (file)
@@ -188,8 +188,8 @@ void test ()
         owned_set.nth_index_in_set (i);
       if (constraints.is_constrained(glob_index))
         continue;
-      in[0].local_element(i) = (double)rand()/RAND_MAX;
-      in[1].local_element(i) = (double)rand()/RAND_MAX;
+      in[0].local_element(i) = (double)myrand()/RAND_MAX;
+      in[1].local_element(i) = (double)myrand()/RAND_MAX;
     }
 
   mf.vmult (out, in);
index 33b74fea1a2b3129f81be3387c6861e3cbf2b8e4..dcbf078bd56751aa7fe8c9a67800d0bbbde594b1 100644 (file)
@@ -191,8 +191,8 @@ void test ()
         owned_set.nth_index_in_set (i);
       if (constraints.is_constrained(glob_index))
         continue;
-      in.block(0).local_element(i) = (double)rand()/RAND_MAX;
-      in.block(1).local_element(i) = (double)rand()/RAND_MAX;
+      in.block(0).local_element(i) = (double)myrand()/RAND_MAX;
+      in.block(1).local_element(i) = (double)myrand()/RAND_MAX;
     }
 
   mf.vmult (out, in);
index 2993a1f2baa233e9c36a223b36154141ef86f07b..36fcc82a4589615154c779cdf549305d89284775 100644 (file)
@@ -239,7 +239,7 @@ void test ()
   for (unsigned int i=0; i<dim; ++i)
     for (unsigned int j=0; j<system_rhs.block(i).size(); ++j)
       {
-        const double val = -1. + 2.*(double)rand()/double(RAND_MAX);
+        const double val = -1. + 2.*(double)myrand()/double(RAND_MAX);
         system_rhs.block(i)(j) = val;
       }
   constraints.condense(system_rhs);
index 875638b89e48c5392b8f0e7ea69a1c85e1d9b499..c4af939d566221fe8c7b1c26df8dd07bbcde2b73 100644 (file)
@@ -243,7 +243,7 @@ void test ()
   for (unsigned int i=0; i<dim; ++i)
     for (unsigned int j=0; j<system_rhs.block(i).size(); ++j)
       {
-        const double val = -1. + 2.*(double)rand()/double(RAND_MAX);
+        const double val = -1. + 2.*(double)myrand()/double(RAND_MAX);
         system_rhs.block(i)(j) = val;
       }
   constraints.condense(system_rhs);
index a56cfd84b5d5f8643f50f67a01368129861d0ece..19b31a5fe181846802466d689a0b80d02422a094 100644 (file)
@@ -137,7 +137,7 @@ void test ()
     endc = dof.end();
     for (; cell!=endc; ++cell)
       {
-        const unsigned int fe_index = rand() % max_degree;
+        const unsigned int fe_index = myrand() % max_degree;
         cell->set_active_fe_index (fe_index);
       }
   }
@@ -222,7 +222,7 @@ void test ()
   for (unsigned int i=0; i<dof.n_dofs(); ++i)
     {
       if (constraints.is_constrained(i) == false)
-        src(i) = (double)rand()/RAND_MAX;
+        src(i) = (double)myrand()/RAND_MAX;
     }
 
   // now perform matrix-vector product and check
index c86f675a4089dccdf940f220f09457430c7ab301..1bbc885654718d708aad90d219749d29a8b784cd 100644 (file)
@@ -177,7 +177,7 @@ void test ()
   for (unsigned int i=0; i<dof.n_dofs(); ++i)
     {
       if (constraints.is_constrained(i) == false)
-        src(i) = (double)rand()/RAND_MAX;
+        src(i) = (double)myrand()/RAND_MAX;
     }
 
   // now perform matrix-vector product and check
@@ -198,7 +198,7 @@ void test ()
       for (unsigned int i=0; i<dof.n_dofs(level); ++i)
         {
           if (mg_constraints[level].is_constrained(i) == false)
-            src(i) = (double)rand()/RAND_MAX;
+            src(i) = (double)myrand()/RAND_MAX;
         }
 
       // now perform matrix-vector product and check
index 04c50031924b8605e7f6d4c612811d7f834d5aa6..fd8d549a3dfe4d98132d3c413cb58e64ab381972 100644 (file)
@@ -268,7 +268,7 @@ void test ()
   for (unsigned int i=0; i<dim+1; ++i)
     for (unsigned int j=0; j<system_rhs.block(i).size(); ++j)
       {
-        const double val = -1. + 2.*(double)rand()/double(RAND_MAX);
+        const double val = -1. + 2.*(double)myrand()/double(RAND_MAX);
         system_rhs.block(i)(j) = val;
         vec1[i](j) = val;
       }
index c4cfd300ae7e5b4482cb6f725d76b9c7afa3e48b..3d01a123e87dc63f6dc374fd95c17c65061d0f58 100644 (file)
@@ -283,13 +283,13 @@ void test ()
   for (unsigned int j=0; j<system_rhs.block(0).size(); ++j)
     if (constraints_u.is_constrained(j) == false)
       {
-        const double val = -1 + 2.*(double)rand()/double(RAND_MAX);
+        const double val = -1 + 2.*(double)myrand()/double(RAND_MAX);
         system_rhs.block(0)(j) = val;
       }
   for (unsigned int j=0; j<system_rhs.block(1).size(); ++j)
     if (constraints_p.is_constrained(j) == false)
       {
-        const double val = -1 + 2.*(double)rand()/double(RAND_MAX);
+        const double val = -1 + 2.*(double)myrand()/double(RAND_MAX);
         system_rhs.block(1)(j) = val;
       }
 
index 3c2af197fccc697df80bad9f92b51885bf1b3b91..4b4846e7c744de7ef0676314b58af6404ecbd837 100644 (file)
@@ -126,7 +126,7 @@ void do_test (const DoFHandler<dim> &dof,
     {
       if (constraints.is_constrained(i))
         continue;
-      const double entry = rand()/(double)RAND_MAX;
+      const double entry = myrand()/(double)RAND_MAX;
       solution(i) = entry;
     }
 
index 76a8d3d2f3fa00e3471afc28549c839bb1649110..a108ee375827b15b6295760f10dda1e16e34d6cd 100644 (file)
@@ -110,7 +110,7 @@ void sub_test()
         {
           if (constraints.is_constrained(i))
             continue;
-          const double entry = rand()/(double)RAND_MAX;
+          const double entry = myrand()/(double)RAND_MAX;
           in_dist(i) = entry;
         }
 
index 1cd2e405b342fedc1407ea3041f85b2fbeaeb2db..6c0130e5738c139e14eb6db0fb18bab6d32cab8b 100644 (file)
@@ -107,7 +107,7 @@ void do_test (const unsigned int parallel_option)
       cell = tria.begin_active (),
       endc = tria.end();
       for (; cell!=endc; ++cell)
-        if (rand() % (7-i) == 0)
+        if (myrand() % (7-i) == 0)
           cell->set_refine_flag();
       tria.execute_coarsening_and_refinement();
     }
@@ -131,7 +131,7 @@ void do_test (const unsigned int parallel_option)
     endc = dof.end();
     for (; cell!=endc; ++cell)
       {
-        const unsigned int fe_index = rand() % max_degree;
+        const unsigned int fe_index = myrand() % max_degree;
         cell->set_active_fe_index (fe_index);
       }
   }
@@ -189,7 +189,7 @@ void do_test (const unsigned int parallel_option)
       for (unsigned int i=0; i<dof.n_dofs(); ++i)
         {
           if (constraints.is_constrained(i) == false)
-            src(i) = (double)rand()/RAND_MAX;
+            src(i) = (double)myrand()/RAND_MAX;
         }
 
       // now perform 30 matrix-vector products in
index e721100e81797179ea28c719b5f81ae7270e41b3..b24169b7ca30989c1c34483a4ae4031bfdc90036 100644 (file)
@@ -58,7 +58,7 @@ void test ()
     {
       if (constraints.is_constrained(i))
         continue;
-      const double entry = rand()/(double)RAND_MAX;
+      const double entry = myrand()/(double)RAND_MAX;
       solution(i) = entry;
     }
 
index 4dd55b01051a70b141165a608b1e34ce0898f50c..4a11e07d39c34a7781881fbaded86d5b57259f6c 100644 (file)
@@ -68,7 +68,7 @@ void test()
       endc = tr.end();
 
       for (; cell!=endc; ++cell)
-        if (rand()%42==1)
+        if (myrand()%42==1)
           cell->set_refine_flag ();
 
       tr.execute_coarsening_and_refinement ();
index 39a43ce53f97b186546f193dd879cde4ae6921cc..dbc6c47502aeeee7dfbc7cebbe622f6a02bc5a5a 100644 (file)
@@ -60,7 +60,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index 857f65c7ecd580cb7323b24d97cf1af33fd13790..cea95adca7642a1078289a804752194207358563 100644 (file)
@@ -54,7 +54,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index 258a02a42dd54a7c7137dbc5a0b34e834ece3d72..9a07498f78df44096fba2bf171ea56ccf85d2262 100644 (file)
@@ -62,7 +62,7 @@ void test()
       // refine one-fifth of cells randomly
       std::vector<bool> flags (triangulation.n_active_cells(), false);
       for (unsigned int k=0; k<flags.size()/5 + 1; ++k)
-        flags[rand() % flags.size()] = true;
+        flags[myrand() % flags.size()] = true;
       // make sure there's at least one that
       // will be refined
       flags[0] = true;
index 2e952973187c6f3c0efeffdb2b8a605a403c0067..7cb6335de538fc32e6db83e4014204f94121bae3 100644 (file)
@@ -101,7 +101,7 @@ void test()
         endc = tr.end();
       
       for (; cell!=endc; ++cell)
-       if (rand()%42==1)
+       if (myrand()%42==1)
          cell->set_refine_flag ();
       
       tr.execute_coarsening_and_refinement ();
index 9d381931615663a6a49da6c923d9e77e0f5dc46c..7e342327ea3b7876c8dfb75435a9855fe889df48 100644 (file)
@@ -103,7 +103,7 @@ void test()
         endc = tr.end();
       
       for (; cell!=endc; ++cell)
-       if (rand()%42==1)
+       if (myrand()%42==1)
          cell->set_refine_flag ();
       
       tr.execute_coarsening_and_refinement ();
index c8ccf8c3f575564be72c51fc42c37ccffcad95a1..77a2878c97a4dcb708bc5da383bd12eed99301e8 100644 (file)
@@ -123,7 +123,7 @@ void test()
       endc = tr.end();
 
       for (; cell!=endc; ++cell)
-        if (rand()%42==1)
+        if (myrand()%42==1)
           cell->set_refine_flag ();
 
       tr.execute_coarsening_and_refinement ();
index d256954daa8f962532d1e0ee7fb3bdfc58f92923..eca70837167cd3e27818e9329fd09c7c26887dd3 100644 (file)
@@ -160,7 +160,7 @@ void test()
         endc = tr.end();
 
         for (; cell!=endc; ++cell)
-          if (rand()%42==1)
+          if (myrand()%42==1)
             cell->set_refine_flag ();
 
         tr.execute_coarsening_and_refinement ();
@@ -200,9 +200,9 @@ void test()
         for (; cell!=endc; ++cell)
           if (!cell->is_artificial() && !cell->is_ghost())
             {
-              if (rand()%12==1)
+              if (myrand()%12==1)
                 cell->set_refine_flag ();
-              else if (rand()%7==1)
+              else if (myrand()%7==1)
                 cell->set_coarsen_flag ();
             }
       }
index dc10d4bb8c4758e09e694104f79471d7d55159b0..4de08b4f54736f248cc6fc2d58233137303bd4d3 100644 (file)
@@ -59,7 +59,7 @@ void test()
           std::vector<bool> flags (tr.n_locally_owned_active_cells(), false);
           for (unsigned int i=0; i<tr.n_locally_owned_active_cells() / 5 + 1; ++i)
             {
-              const unsigned int x = rand() % flags.size();
+              const unsigned int x = myrand() % flags.size();
               flags[x] = true;
             }
 
index e97752de3e10e7ec56c4bbbafffde1380133464b..4e89fe123a2703bd0bd9ff61a1d8440855fe22a9 100644 (file)
@@ -60,7 +60,7 @@ void test()
           std::vector<bool> flags (tr.n_locally_owned_active_cells(), false);
           for (unsigned int i=0; i<tr.n_locally_owned_active_cells() / 5 + 1; ++i)
             {
-              const unsigned int x = rand() % flags.size();
+              const unsigned int x = myrand() % flags.size();
               flags[x] = true;
             }
 
index 12f4ae3c947af2d43d907bdcf1863b4e992db0c7..93ebb774090c3432eba71611f98e72910a0c2880 100644 (file)
@@ -60,7 +60,7 @@ void test()
           std::vector<bool> flags (tr.n_locally_owned_active_cells(), false);
           for (unsigned int i=0; i<tr.n_locally_owned_active_cells() / 5 + 1; ++i)
             {
-              const unsigned int x = rand() % flags.size();
+              const unsigned int x = myrand() % flags.size();
               flags[x] = true;
             }
 
index b9de49010dcf4cf3a354d23358dbe1afe186f241..c1b1acf6cfdbe404a10777a408cae9c3cd24cdd9 100644 (file)
@@ -60,7 +60,7 @@ void test()
           // will be refined.
           for (unsigned int i=0; i<tr.n_active_cells() / 5 + 1; ++i)
             {
-              const unsigned int x = rand() % flags.size();
+              const unsigned int x = myrand() % flags.size();
               flags[x] = true;
             }
 
index e35d11ca0e4c7efc94ba662d4b37c3e4429bcb09..23261eb4f69db24f6bbca2b3271bf628bc2a107d 100644 (file)
@@ -60,7 +60,7 @@ void test()
       endc = tr.end();
 
       for (; cell!=endc; ++cell)
-        if (rand()%42==1)
+        if (myrand()%42==1)
           cell->set_refine_flag ();
 
       tr.execute_coarsening_and_refinement ();
index 6d0d656f507d2bfe521bc7feb85d4d9af5618046..7745179056e8b615c0743aa9927ae9f8ddaea98d 100644 (file)
@@ -60,7 +60,7 @@ void test()
       endc = tr.end();
 
       for (; cell!=endc; ++cell)
-        if (rand()%42==1)
+        if (myrand()%42==1)
           cell->set_refine_flag ();
 
       tr.execute_coarsening_and_refinement ();
index 6366dbae460281c682fc06df5d45687e83ba0c2e..1b47188f1b81fc73424599547a0f9556b5c3eb3b 100644 (file)
@@ -159,7 +159,7 @@ void test()
         endc = tr.end();
 
         for (; cell!=endc; ++cell)
-          if (rand()%42==1)
+          if (myrand()%42==1)
             cell->set_refine_flag ();
 
         tr.execute_coarsening_and_refinement ();
@@ -199,9 +199,9 @@ void test()
         for (; cell!=endc; ++cell)
           if (!cell->is_artificial() && !cell->is_ghost())
             {
-              if (rand()%12==1)
+              if (myrand()%12==1)
                 cell->set_refine_flag ();
-              else if (rand()%7==1)
+              else if (myrand()%7==1)
                 cell->set_coarsen_flag ();
             }
       }
index 484cc12dcbc530a7fe1baa35987fa50449d3cd6b..84eb720cd6f45a903f72dd2c87c11e1be3c78512 100644 (file)
@@ -60,7 +60,7 @@ void test()
           // will be refined.
           for (unsigned int i=0; i<tr.n_active_cells() / 5 + 1; ++i)
             {
-              const unsigned int x = rand() % flags.size();
+              const unsigned int x = myrand() % flags.size();
               flags[x] = true;
             }
 
index c47727cdc8273e401afdee3ce367eaf2d4aae4d3..94ea3e4a447582f893a3ec9d23904e7cc4d842b2 100644 (file)
@@ -100,7 +100,7 @@ void test ()
   for (unsigned int i=0; i<col_partitioning.n_elements(); ++i)
     {
       const unsigned int global_index = col_partitioning.nth_index_in_set(i);
-      dx(global_index) = (double)rand()/RAND_MAX;
+      dx(global_index) = (double)myrand()/RAND_MAX;
       x(global_index)  = dx(global_index);
     }
   dy = 1.;
index 3eec9e3c5f11a12f6d27a17695ff5d28fb7fdced..6c601200e6684e106e68357db7c6909c54343607 100644 (file)
@@ -100,7 +100,7 @@ void test ()
   for (unsigned int i=0; i<row_partitioning.n_elements(); ++i)
     {
       const unsigned int global_index = row_partitioning.nth_index_in_set(i);
-      dy(global_index) = (double)rand()/RAND_MAX;
+      dy(global_index) = (double)myrand()/RAND_MAX;
       y(global_index)  = dy(global_index);
     }
   dx = 1.;
index 7daa065e65c0443ae403f704a7c498fcdd70c395..7649ecb009a3d31ba11ca72d056b9f65430e5263 100644 (file)
@@ -94,7 +94,7 @@ void test ()
   for (unsigned int i=0; i<col_partitioning.n_elements(); ++i)
     {
       const unsigned int global_index = col_partitioning.nth_index_in_set(i);
-      dx(global_index) = (double)rand()/RAND_MAX;
+      dx(global_index) = (double)myrand()/RAND_MAX;
       x(global_index)  = dx(global_index);
     }
   dy = 1.;
index 16427b58b16524143343798afc12ab31b704edbe..68269260279c726f91cd34860e10bed6eb4f7d99 100644 (file)
@@ -40,7 +40,7 @@ void test (PETScWrappers::MatrixBase &m)
     {
       if (i>=5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.add (i,i-5, s);
           norm_sqr += s*s;
           ++nnz;
@@ -48,13 +48,13 @@ void test (PETScWrappers::MatrixBase &m)
 
       if (i<N-5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.add (i,i+5, s);
           norm_sqr += s*s;
           ++nnz;
         }
 
-      const double s = rand();
+      const double s = myrand();
       m.add (i,i,s);
       norm_sqr += s*s;
       ++nnz;
index 6c18362cd95b3e5eb27fb3761d03cabe0f3d39da..34febf212669bc6b01379cb4cb7405eb8689e711 100644 (file)
@@ -42,7 +42,7 @@ void test (PETScWrappers::MatrixBase &m)
     {
       if (i>=5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.add (i,i-5, s);
           norm_sqr += s*s;
           ++nnz;
@@ -50,13 +50,13 @@ void test (PETScWrappers::MatrixBase &m)
 
       if (i<N-5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.add (i,i+5, s);
           norm_sqr += s*s;
           ++nnz;
         }
 
-      const double s = rand();
+      const double s = myrand();
       m.add (i,i,s);
       norm_sqr += s*s;
       ++nnz;
index 2719ce002a2cfad76df86bd20f7267130d1eb4b1..802565b7c74fd942c502a9e45d3e2b453c4de4c1 100644 (file)
@@ -40,7 +40,7 @@ void test (PETScWrappers::MatrixBase &m)
     {
       if (i>=5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.add (i,i-5, s);
           norm_sqr += s*s;
           ++nnz;
@@ -48,13 +48,13 @@ void test (PETScWrappers::MatrixBase &m)
 
       if (i<N-5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.add (i,i+5, s);
           norm_sqr += s*s;
           ++nnz;
         }
 
-      const double s = rand();
+      const double s = myrand();
       m.add (i,i,s);
       norm_sqr += s*s;
       ++nnz;
@@ -72,7 +72,7 @@ void test (PETScWrappers::MatrixBase &m)
 
   // now remove the entries of row N/2. set
   // diagonal entries to rnd
-  const double rnd = rand();
+  const double rnd = myrand();
   for (unsigned int i=0; i<N; ++i)
     {
       const double s = m.el(N/2,i);
index c01c3f083904fb7e8fbb4e5f6601c0f075f863c8..1d4e91eca8eab70e99d6f2fceec8a1d755de93be 100644 (file)
@@ -42,7 +42,7 @@ void test (PETScWrappers::MatrixBase &m)
     {
       if (i>=5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.add (i,i-5, s);
           norm_sqr += s*s;
           ++nnz;
@@ -50,13 +50,13 @@ void test (PETScWrappers::MatrixBase &m)
 
       if (i<N-5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.add (i,i+5, s);
           norm_sqr += s*s;
           ++nnz;
         }
 
-      const double s = rand();
+      const double s = myrand();
       m.add (i,i,s);
       norm_sqr += s*s;
       ++nnz;
@@ -74,7 +74,7 @@ void test (PETScWrappers::MatrixBase &m)
 
   // now remove the entries of rows N/2 and
   // N/3. set diagonal entries to rnd
-  const double rnd = rand();
+  const double rnd = myrand();
   for (size_type i=0; i<N; ++i)
     {
       const double s = m.el(N/2,i);
index 295bc369660c47ae93c546d5c6816b00be7fd42c..0b75bfa0488e3fd6db8634e19e44115d4182fe17 100644 (file)
@@ -53,7 +53,7 @@ void test ()
       {
         // pick a random element among the
         // unused indices
-        const unsigned int k = rand() % (N-i);
+        const unsigned int k = myrand() % (N-i);
         permutation[i] = unused_indices[k];
 
         // then swap this used element to the
@@ -75,26 +75,26 @@ void test ()
         const unsigned int j=permutation[j_];
 
         const unsigned int global = i*N+j;
-        matrix.add(global, global, rand());
+        matrix.add(global, global, myrand());
         if (j>0)
           {
-            matrix.add(global-1, global, rand());
-            matrix.add(global, global-1, rand());
+            matrix.add(global-1, global, myrand());
+            matrix.add(global, global-1, myrand());
           }
         if (j<N-1)
           {
-            matrix.add(global+1, global, rand());
-            matrix.add(global, global+1, rand());
+            matrix.add(global+1, global, myrand());
+            matrix.add(global, global+1, myrand());
           }
         if (i>0)
           {
-            matrix.add(global-N, global, rand());
-            matrix.add(global, global-N, rand());
+            matrix.add(global-N, global, myrand());
+            matrix.add(global, global-N, myrand());
           }
         if (i<N-1)
           {
-            matrix.add(global+N, global, rand());
-            matrix.add(global, global+N, rand());
+            matrix.add(global+N, global, myrand());
+            matrix.add(global, global+N, myrand());
           }
       }
   matrix.compress (VectorOperation::add);
index bcc14d635efc641f63d08530d887cbbb4af06c43..471f68f55942366f5833d2538e34c872e91307f6 100644 (file)
@@ -81,16 +81,6 @@ void mysrand(int seed) throw()
   myrand(true, seed);
 }
 
-int rand() throw()
-{
-  return myrand();
-}
-
-void srand(int seed) throw()
-{
-  mysrand(seed);
-}
-
 
 
 // given the name of a file, copy it to deallog
index 4ad9eb1dbb6ad1533ccf6bee9778796adbf208a2..764c49bd5084434271c340664b1d6d1ea205aa9c 100644 (file)
@@ -41,7 +41,7 @@ void test (TrilinosWrappers::SparseMatrix &m)
     {
       if (i>=5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.set (i,i-5, s);
           norm_sqr += s*s;
           ++nnz;
@@ -49,13 +49,13 @@ void test (TrilinosWrappers::SparseMatrix &m)
 
       if (i<N-5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.set (i,i+5, s);
           norm_sqr += s*s;
           ++nnz;
         }
 
-      const double s = rand();
+      const double s = myrand();
       m.set (i,i,s);
       norm_sqr += s*s;
       ++nnz;
index bae94a8f93181a91b369f046be2fe27d9b26eb11..23adcbb7bd6b1cd00216ffe6f58429b12e23f75e 100644 (file)
@@ -41,7 +41,7 @@ void test (TrilinosWrappers::SparseMatrix &m)
     {
       if (i>=5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.set (i,i-5, s);
           norm_sqr += s*s;
           ++nnz;
@@ -49,13 +49,13 @@ void test (TrilinosWrappers::SparseMatrix &m)
 
       if (i<N-5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.set (i,i+5, s);
           norm_sqr += s*s;
           ++nnz;
         }
 
-      const double s = rand();
+      const double s = myrand();
       m.set (i,i,s);
       norm_sqr += s*s;
       ++nnz;
index e9152a96f661aab8fd058d5afcec5b62f2c5c7d0..c0cb3860b41741710c8db9602f0d74e817064f4c 100644 (file)
@@ -41,7 +41,7 @@ void test (TrilinosWrappers::SparseMatrix &m)
     {
       if (i>=5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.set (i,i-5, s);
           norm_sqr += s*s;
           ++nnz;
@@ -49,13 +49,13 @@ void test (TrilinosWrappers::SparseMatrix &m)
 
       if (i<N-5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.set (i,i+5, s);
           norm_sqr += s*s;
           ++nnz;
         }
 
-      const double s = rand();
+      const double s = myrand();
       m.set (i,i,s);
       norm_sqr += s*s;
       ++nnz;
@@ -73,7 +73,7 @@ void test (TrilinosWrappers::SparseMatrix &m)
 
   // now remove the entries of row N/2. set
   // diagonal entries to rnd
-  const double rnd = rand();
+  const double rnd = myrand();
   for (unsigned int i=0; i<N; ++i)
     {
       const double s = m.el(N/2,i);
index e4f6eaab92da60ba22eada8fd72a95305ec4fdfd..6acb1f7c1b86d3a3137635ccc2173921b53a1751 100644 (file)
@@ -41,7 +41,7 @@ void test (TrilinosWrappers::SparseMatrix &m)
     {
       if (i>=5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.set (i,i-5, s);
           norm_sqr += s*s;
           ++nnz;
@@ -49,13 +49,13 @@ void test (TrilinosWrappers::SparseMatrix &m)
 
       if (i<N-5)
         {
-          const double s = rand();
+          const double s = myrand();
           m.set (i,i+5, s);
           norm_sqr += s*s;
           ++nnz;
         }
 
-      const double s = rand();
+      const double s = myrand();
       m.set (i,i,s);
       norm_sqr += s*s;
       ++nnz;
@@ -73,7 +73,7 @@ void test (TrilinosWrappers::SparseMatrix &m)
 
   // now remove the entries of rows N/2 and
   // N/3. set diagonal entries to rnd
-  const double rnd = rand();
+  const double rnd = myrand();
   for (unsigned int i=0; i<N; ++i)
     {
       const double s = m.el(N/2,i);
index 41ced66b5a8b04818dcf682ace0c884303cd7c36..e462b5154d4e1a586c2f5a5c0865eadd2b0744da 100644 (file)
@@ -54,7 +54,7 @@ void test ()
       {
         // pick a random element among the
         // unused indices
-        const unsigned int k = rand() % (N-i);
+        const unsigned int k = myrand() % (N-i);
         permutation[i] = unused_indices[k];
 
         // then swap this used element to the
@@ -75,26 +75,26 @@ void test ()
         const unsigned int j=permutation[j_];
 
         const unsigned int global = i*N+j;
-        matrix.set(global, global, rand());
+        matrix.set(global, global, myrand());
         if (j>0)
           {
-            matrix.set(global-1, global, rand());
-            matrix.set(global, global-1, rand());
+            matrix.set(global-1, global, myrand());
+            matrix.set(global, global-1, myrand());
           }
         if (j<N-1)
           {
-            matrix.set(global+1, global, rand());
-            matrix.set(global, global+1, rand());
+            matrix.set(global+1, global, myrand());
+            matrix.set(global, global+1, myrand());
           }
         if (i>0)
           {
-            matrix.set(global-N, global, rand());
-            matrix.set(global, global-N, rand());
+            matrix.set(global-N, global, myrand());
+            matrix.set(global, global-N, myrand());
           }
         if (i<N-1)
           {
-            matrix.set(global+N, global, rand());
-            matrix.set(global, global+N, rand());
+            matrix.set(global+N, global, myrand());
+            matrix.set(global, global+N, myrand());
           }
       }
   matrix.compress (VectorOperation::insert);

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.