solves Rt.x=b with same conventions as above nn is not required on entry but is set on exit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | n | ||||
integer | :: | nn | ||||
integer | :: | nmax | ||||
real | :: | R | ||||
real | :: | b |
subroutine rtsol(n,nn,nmax,R,b)
implicit double precision (a-h,o-z)
dimension R(*),b(*)
n2=nmax+2
nn=1
b(1)=b(1)/R(1)
do i=2,n
i1=i-1
call mysaxpy(-b(i1),R(nn+1),b(i),n-i1)
nn=nn+n2-i
b(i)=b(i)/R(nn)
end do
end subroutine rtsol