14 subroutine bandec(a, n, m1, m2, np, mp, al, mpl, indx, d)
18 integer(kind=int_kind),
intent(in) :: n, m1, m2, np, mp, mpl
20 real(kind=dbl_kind),
intent(inout),
dimension(1:,1:) :: a
22 integer(kind=int_kind),
intent(out),
dimension(1:) :: indx
23 real(kind=dbl_kind),
intent(out),
dimension(1:,1:) :: al
24 real(kind=dbl_kind),
intent(out) :: d
27 real(kind=dbl_kind),
parameter:: tiny=1.0e-20_dbl_kind
28 integer(kind=int_kind) :: i, j, k, ell, mm
29 real(kind=dbl_kind) :: dum
56 if (ell < n) ell = ell+1
58 if (abs(a(j,1)) > abs(dum))
then
64 if (dum == 0.0) a(k,1) = tiny
77 a(i, j-1) = a(i,j) - dum*a(k,j)
86 subroutine banbks(a, n, m1, m2, np, mp, al, mpl, indx, b)
90 integer(kind=int_kind),
intent(in):: n, m1, m2, np, mp, mpl
91 integer(kind=int_kind),
intent(in),
dimension(:):: indx
92 real(kind=dbl_kind),
intent(in),
dimension(:,:):: a, al
94 real(kind=dbl_kind),
intent(inout),
dimension(:):: b
98 integer(kind=int_kind):: i, k, ell, mm
99 real(kind=dbl_kind):: dum
103 if (mm > mp .or. m1 > mpl .or. n > np)
then
104 print *,
"Bad arguments in banbks"
116 if (ell < n) ell = ell+1
118 b(i) = b(i) - al(k,i-k)*b(k)
126 dum = dum - a(i,k)*b(k+i-1)
129 if (ell < mm) ell = ell+1