! Genereaza M
! Triunghiul superior - pe COLOANE.
! Ex. csa0-Lin_Din
! ngl =44

subroutine gen_M()
use work
! Genereaza matricea de masa M in tabloul M(n1); n1 =ngl*(ngl+1)/2)
implicit real(8) (a-h, o-z)


M =0.

cm_sup =1223.25	! kg
cm_inf =30.

nn =ngl/2

DO in =1, nn
if(mod(in,2) /=0) then  !1,3,...

do igl =1,2
il =(in-1)*2+igl
m(loca(il,il)) =cm_sup
enddo

else		!2,4,...

do igl =1,2
il =(in-1)*2+igl
m(loca(il,il)) =cm_inf
enddo

endif

ENDDO


END subroutine gen_M
