avm99963 | 9622dc7 | 2022-04-29 15:44:05 +0200 | [diff] [blame] | 1 | subroutine WRITECONFIG(S, L) |
| 2 | implicit none |
| 3 | integer*4, intent(in) :: L |
| 4 | integer*2, intent(out) :: S(1:L,1:L) |
| 5 | integer*4 :: SEED, i, j |
| 6 | real*8 :: genrand_real2 |
| 7 | |
| 8 | SEED = 23456 |
| 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 | |
| 17 | open(1, file = "configuration.conf") |
| 18 | |
| 19 | do i = 1, L |
| 20 | do j = 1, L |
| 21 | if (S(i, j) == 1) then |
| 22 | write(1, *) i, j |
| 23 | endif |
| 24 | enddo |
| 25 | enddo |
| 26 | |
| 27 | close(1) |
| 28 | end subroutine WRITECONFIG |