avm99963 | 45a8a46 | 2022-06-04 12:41:03 +0200 | [diff] [blame] | 1 | real*8 function ENERG(S, L) |
2 | integer*2 :: S(1:64, 1:64) | ||||
3 | integer*4 :: I, J, L, PBC | ||||
4 | real*8 :: ENE | ||||
5 | ENE = 0.0d0 | ||||
6 | do I = 1, L | ||||
7 | do J = 1, L | ||||
8 | ENE = ENE - S(I, J)*S(PBC(I + 1, L), J) - S(I, J)*S(I, PBC(J + 1, L)) | ||||
9 | enddo | ||||
10 | enddo | ||||
11 | ENERG = ENE | ||||
12 | return | ||||
13 | endfunction |