Skip to content

Commit

Permalink
Merge pull request #165 from lanl/Seed2
Browse files Browse the repository at this point in the history
Added seed
  • Loading branch information
nicolasbock authored Jan 8, 2021
2 parents ecb63a7 + 48bdeaa commit 4e73df7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/prg_modelham_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,24 @@ end subroutine prg_parse_mham
subroutine prg_twolevel_model(ea, eb, dab, daiaj, dbibj, dec, rcoeff, reshuffle, &
& seed, h_bml, verbose)
real(dp), intent(in) :: ea, eb, dab, daiaj, dbibj, rcoeff
integer, intent(in) :: verbose
integer :: seed
integer, intent(in) :: verbose, seed
integer, allocatable :: seedin(:)
logical, intent(in) :: reshuffle
type(bml_matrix_t),intent(inout) :: h_bml
real(dp), allocatable :: diagonal(:), row(:), rowi(:), rowj(:)
type(bml_matrix_t) :: ht_bml
integer :: norbs, i, j
integer :: norbs, i, j, ssize
real(dp) :: dec, dist, ran

norbs = bml_get_N(h_bml)
allocate(diagonal(norbs))
allocate(row(norbs))

call random_seed(seed)

call random_seed()
call random_seed(size=ssize)
allocate(seedin(ssize))
seedin = seed
call random_seed(PUT=seedin)

do i=1,norbs
if(mod(i,2) == 0)then
Expand Down

0 comments on commit 4e73df7

Please sign in to comment.