Gitiles
Code Review
Sign In
gerrit.avm99963.com
/
edu
/
college-misc
/
c270ed860645080b3297fd2fb14a40600376e82f
/
.
/
quad10
/
fenomens
/
lab
/
p4
/
energ.f90
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