blob: 431a296824fc19cda660818e87c96cf571bbc748 [file] [log] [blame]
real*8 function energ(S, L)
integer*2 :: S(1:64, 1:64)
integer*4 :: I, J, L, PBC
real*8 :: ENE
ENE = 0.0d0
do I = 1, L
do J = 1, L
ENE = ENE - S(I, J)*S(PBC(I + 1, L), J) - S(I, J)*S(I, PBC(J + 1, L))
enddo
enddo
ENERG = ENE
return
endfunction