changed fixed_seed to random_seed for clarity
This commit is contained in:
parent
548145af19
commit
e4700cda25
|
@ -49,7 +49,7 @@ maxVolDiscrepancy_RGC 1.0e-5 # maximum allowable relative volume discr
|
|||
volDiscrepancyMod_RGC 1.0e+12
|
||||
discrepancyPower_RGC 5.0
|
||||
|
||||
fixed_seed 0 # put any number larger than zero, integer, if you want to have a pseudo random distribution
|
||||
random_seed 0 # any integer larger than zero seeds the random generator, otherwise random seeding
|
||||
|
||||
## spectral parameters ##
|
||||
err_div_tolAbs 1.0e-3 # absolute tolerance for fulfillment of stress equilibrium
|
||||
|
|
|
@ -177,7 +177,7 @@ subroutine math_init
|
|||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use numerics, only: fixedSeed
|
||||
use numerics, only: randomSeed
|
||||
use IO, only: IO_timeStamp
|
||||
|
||||
implicit none
|
||||
|
@ -194,8 +194,8 @@ subroutine math_init
|
|||
call random_seed(size=randSize)
|
||||
if (allocated(randInit)) deallocate(randInit)
|
||||
allocate(randInit(randSize))
|
||||
if (fixedSeed > 0_pInt) then
|
||||
randInit(1:randSize) = int(fixedSeed) ! fixedSeed is of type pInt, randInit not
|
||||
if (randomSeed > 0_pInt) then
|
||||
randInit(1:randSize) = int(randomSeed) ! randomSeed is of type pInt, randInit not
|
||||
call random_seed(put=randInit)
|
||||
else
|
||||
call random_seed()
|
||||
|
|
|
@ -25,7 +25,7 @@ module numerics
|
|||
nState = 10_pInt, & !< state loop limit
|
||||
nStress = 40_pInt, & !< stress loop limit
|
||||
pert_method = 1_pInt, & !< method used in perturbation technique for tangent
|
||||
fixedSeed = 0_pInt, & !< fixed seeding for pseudo-random number generator, Default 0: use random seed
|
||||
randomSeed = 0_pInt, & !< fixed seeding for pseudo-random number generator, Default 0: use random seed
|
||||
worldrank = 0_pInt, & !< MPI worldrank (/=0 for MPI simulations only)
|
||||
worldsize = 0_pInt !< MPI worldsize (/=0 for MPI simulations only)
|
||||
integer(4), protected, public :: &
|
||||
|
@ -359,8 +359,8 @@ subroutine numerics_init
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! random seeding parameter
|
||||
case ('fixed_seed')
|
||||
fixedSeed = IO_intValue(line,chunkPos,2_pInt)
|
||||
case ('random_seed','fixed_seed')
|
||||
randomSeed = IO_intValue(line,chunkPos,2_pInt)
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! gradient parameter
|
||||
|
@ -560,9 +560,9 @@ subroutine numerics_init
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! Random seeding parameter
|
||||
write(6,'(a24,1x,i16,/)') ' fixed_seed: ',fixedSeed
|
||||
if (fixedSeed <= 0_pInt) &
|
||||
write(6,'(a,/)') ' No fixed Seed: Random is random!'
|
||||
write(6,'(a24,1x,i16,/)') ' random_seed: ',randomSeed
|
||||
if (randomSeed <= 0_pInt) &
|
||||
write(6,'(a,/)') ' random seed will be generated!'
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! gradient parameter
|
||||
|
|
Loading…
Reference in New Issue