From 166b86a80a58a6fe11d019d5e2ba310e3a2966ce Mon Sep 17 00:00:00 2001 From: John Tramm Date: Fri, 6 Dec 2019 16:36:00 +0000 Subject: [PATCH] fixed other python math function default seed value generation technique. --- openmc/lib/math.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openmc/lib/math.py b/openmc/lib/math.py index a2a7e0d9b..bdb09b2d1 100644 --- a/openmc/lib/math.py +++ b/openmc/lib/math.py @@ -210,7 +210,7 @@ def rotate_angle(uvw0, mu, phi, prn_seed=None): """ if prn_seed is None: - prn_seed = getrandbits(64) + prn_seed = getrandbits(63) uvw0_arr = np.array(uvw0, dtype=np.float64) if phi is None: @@ -242,7 +242,7 @@ def maxwell_spectrum(T, prn_seed=None): """ if prn_seed is None: - prn_seed = randint(0,10000000) + prn_seed = getrandbits(63) return _dll.maxwell_spectrum(T, c_uint64(prn_seed)) @@ -267,7 +267,7 @@ def watt_spectrum(a, b, prn_seed=None): """ if prn_seed is None: - prn_seed = randint(0,10000000) + prn_seed = getrandbits(63) return _dll.watt_spectrum(a, b, c_uint64(prn_seed)) @@ -292,7 +292,7 @@ def normal_variate(mean_value, std_dev, prn_seed=None): """ if prn_seed is None: - prn_seed = randint(0,10000000) + prn_seed = getrandbits(63) return _dll.normal_variate(mean_value, std_dev, c_uint64(prn_seed))