avm99963 | 802583e | 2022-05-12 10:56:56 +0200 | [diff] [blame] | 1 | subroutine WRITECONFIGSEED(S, L, SEED) |
2 | implicit none | ||||
3 | integer*4, intent(in) :: L | ||||
4 | integer*4, intent(in) :: SEED | ||||
5 | integer*2, intent(out) :: S(1:L,1:L) | ||||
6 | integer*4 :: i, j | ||||
7 | real*8 :: genrand_real2 | ||||
8 | |||||
9 | call init_genrand(SEED) | ||||
10 | |||||
11 | do i = 1, L | ||||
12 | do j = 1, L | ||||
13 | S(i, j) = merge(1, -1, genrand_real2() < .5d0) | ||||
14 | enddo | ||||
15 | enddo | ||||
16 | end subroutine WRITECONFIGSEED |