1
subroutine dclmat(ia, n, a, b, ib, w, c, ndng)
4
c computes a matrix polynomial representated in a chebyshev
5
c base by the clenshaw method.
9
c subroutine dclmat(ia, n, a, b, ib,w , c, ndng)
11
c integer ia,n,ib,ndng
12
c double precision a,b,w,c
13
c dimension a(ia,n), b(ib,n), c(*), w(*)
15
c ia: the leading dimension of array a.
16
c n: the order of the matrices a,b.
17
c a: the array that contains the n*n matrix a
18
c b: the array that contains the n*n matrix
20
c ib:the leading dimension of array b.
21
c w : work-space array of size n+n
22
c c: vectors which contains the coefficients
24
c ndng: the polynomial order.
27
c dmmul (blas.extension)
31
double precision a,b,w,c
32
dimension a(ia,n), b(ib,n), c(*), w(*)
35
integer i1,i,im1,j,ndng1,ndng2
36
double precision two,zero,rc,wd,w1,half
37
data zero, two, half /0.0d+0,2.0d+0,0.50d+0/
50
call dmmul(a,ia,w,1,b(1,j),ib,n,n,1)
52
w1 = two*b(i,j) - w(n+i)
58
call dmmul(a,ia,w,n,b(1,j),ib,n,n,1)
60
w(i) = two*b(i,j) - w(n+i)
64
b(i,j) = (w(i)-w(n+i))*half
66
b(j,j) = b(j,j) + half*wd