blob: ba7841cc5c96aa934e8b7d0b48556fd820465bc5 [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