stardis

Perform coupled heat transfer calculations
git clone git://git.meso-star.fr/stardis.git
Log | Files | Refs | README | LICENSE

commit afe99d6c797c24b51ff6e3a1d89e668f4dbfe881
parent 910a9e22220ed4494039ea96200d58148556e954
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Wed,  9 Mar 2022 16:34:12 +0100

Change random generator type to Threefry

Diffstat:
Msrc/stardis-compute.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/stardis-compute.c b/src/stardis-compute.c @@ -376,7 +376,10 @@ error: #define READ_RANDOM_STATE(Name) \ if(!stardis->mpi_initialized || stardis->mpi_rank == 0) { \ - if(!str_is_empty(Name)) { \ + if(str_is_empty(Name)) { \ + /* Force using threefry independently of the default RNG type */ \ + args.rng_type = SSP_RNG_THREEFRY; \ + } else { \ const char* name = str_cget(Name); \ stream = fopen(name, "r"); \ if(!stream) { \ @@ -386,7 +389,7 @@ error: name); \ goto error; \ } \ - ERR(ssp_rng_create(stardis->allocator, SSP_RNG_MT19937_64, &args.rng_state)); \ + ERR(ssp_rng_create(stardis->allocator, SSP_RNG_THREEFRY, &args.rng_state)); \ res = read_random_generator_state(args.rng_state, stream); \ if(res != RES_OK) { \ logger_print(stardis->logger, LOG_ERROR, \