From: Wolfgang Bangerth <bangerth@colostate.edu>
Date: Thu, 12 Jan 2023 15:59:09 +0000 (-0700)
Subject: Use platform independent random numbers.
X-Git-Tag: v9.5.0-rc1~657^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b936ae3ea55dff2d82e20ba9963a1fb3ab100cfb;p=dealii.git

Use platform independent random numbers.
---

diff --git a/tests/grid/reference_cell_type_04.cc b/tests/grid/reference_cell_type_04.cc
index 07e13e9ae8..07c69f4b44 100644
--- a/tests/grid/reference_cell_type_04.cc
+++ b/tests/grid/reference_cell_type_04.cc
@@ -35,16 +35,13 @@ test(const ReferenceCell &reference_cell)
   unsigned int       n_samples_inside = 0;
   const unsigned int n_samples        = 200000;
 
-  std::uniform_real_distribution<> uniform_distribution(-1., 1.);
-  std::mt19937                     rng;
-
   for (unsigned int n = 0; n < n_samples; ++n)
     {
       // Choose a random point in the box [-1,1]^d that contains all
       // of our reference cells:
       Point<dim> p;
       for (unsigned int d = 0; d < dim; ++d)
-        p[d] = uniform_distribution(rng);
+        p[d] = random_value<double>(-1, 1);
 
       if (reference_cell.contains_point(p))
         ++n_samples_inside;
diff --git a/tests/grid/reference_cell_type_04.output b/tests/grid/reference_cell_type_04.output
index 8eadf35e7d..be3b60bd18 100644
--- a/tests/grid/reference_cell_type_04.output
+++ b/tests/grid/reference_cell_type_04.output
@@ -1,22 +1,22 @@
 
 DEAL:1D::ReferenceCell: Line
 DEAL:1D::  self-reported volume = 1.00000
-DEAL:1D::  computed approximate volume = 1.00091
+DEAL:1D::  computed approximate volume = 1.00076
 DEAL:2D::ReferenceCell: Quad
 DEAL:2D::  self-reported volume = 1.00000
-DEAL:2D::  computed approximate volume = 0.998800
+DEAL:2D::  computed approximate volume = 1.00358
 DEAL:2D::ReferenceCell: Tri
 DEAL:2D::  self-reported volume = 0.500000
-DEAL:2D::  computed approximate volume = 0.498940
+DEAL:2D::  computed approximate volume = 0.497740
 DEAL:3D::ReferenceCell: Tet
 DEAL:3D::  self-reported volume = 0.166667
-DEAL:3D::  computed approximate volume = 0.166560
+DEAL:3D::  computed approximate volume = 0.169240
 DEAL:3D::ReferenceCell: Pyramid
 DEAL:3D::  self-reported volume = 1.33333
-DEAL:3D::  computed approximate volume = 1.33892
+DEAL:3D::  computed approximate volume = 1.34152
 DEAL:3D::ReferenceCell: Wedge
 DEAL:3D::  self-reported volume = 0.500000
-DEAL:3D::  computed approximate volume = 0.496800
+DEAL:3D::  computed approximate volume = 0.499080
 DEAL:3D::ReferenceCell: Hex
 DEAL:3D::  self-reported volume = 1.00000
-DEAL:3D::  computed approximate volume = 0.994000
+DEAL:3D::  computed approximate volume = 1.00820