subroutine WRITECONFIG(S, L) | |
implicit none | |
integer*4, intent(in) :: L | |
integer*2, intent(out) :: S(1:64,1:64) | |
integer*4 :: SEED, i, j | |
real*8 :: genrand_real2 | |
SEED = 23456 | |
call init_genrand(SEED) | |
do i = 1, L | |
do j = 1, L | |
if (genrand_real2() < .5d0) then | |
S(i, j) = 1 | |
else | |
S(i, j) = -1 | |
endif | |
enddo | |
enddo | |
end subroutine WRITECONFIG |