! Generates matrix A (usually, for regualar pattern)
! n1 =n*(n+1)/2
subroutine Agen(ag)
use work

implicit real(8) (a-h,o-z)

real(8) ag(n*(n+1)/2)

ag =0.

! Ex. analitic:
!ag(1,1) =1
!ag(1,2) =-sqrt(2.)/2
!ag(2,2) =1.5
!ag(1,3)=0
!ag(2,3) =-2/sqrt(5.)
!ag(3,3) =2.4

![11, 12 22; 13,23,33]
ag(1) =1
ag(2) =-sqrt(2.)/2
ag(3)=1.5
ag(4) =0
ag(5) =-2/sqrt(5.)
ag(6) =2.4


END subroutine Agen
