blob: 5313d0b7de781a5d3d577462f0a6e73ec6512226 [file] [log] [blame]
subroutine WRITECONFIG(S, L)
implicit none
integer*4, intent(in) :: L
integer*2, intent(out) :: S(1:L,1:L)
integer*4 :: SEED, i, j
real*8 :: genrand_real2
SEED = 23456
call init_genrand(SEED)
do i = 1, L
do j = 1, L
S(i, j) = merge(1, -1, genrand_real2() < .5d0)
enddo
enddo
open(1, file = "configuration.conf")
do i = 1, L
do j = 1, L
if (S(i, j) == 1) then
write(1, *) i, j
endif
enddo
enddo
close(1)
end subroutine WRITECONFIG