blob: 0e7df92330c048bc5a97be409d5d4843ea3075e4 [file] [log] [blame]
avm99963802583e2022-05-12 10:56:56 +02001real*8 function MAGNE(S, L)
2 implicit none
3 integer*4, intent(in) :: L
4 integer*2, intent(out) :: S(1:L,1:L)
5 integer*4 :: i, j
6 real*8 :: mag
7 mag = 0d0
8
9 do i = 1, L
10 do j = 1, L
11 mag = mag + S(i, j)
12 enddo
13 enddo
14
15 magne = mag
16 return
17end function MAGNE