subroutine bl3cndp(n, k, E, D, F, G, pivot, est, isign, v, work, * anorm) c This version of bl3dcndp dated April 13, 2000. c c*************************************************************** c c this program computes the condition number of a block tri- c diagonal matrix of the form: c c D(1) E(1) O O O ............ O c F(1) D(2) E(2) O O ............ O c O F(2) D(3) E(3) O ............ O c .................................... c c O O ........F(n-1) D(n-1) E(n-1) c O O .............. F(n-1) D(n) c where each block, E(j), D(j), F(j) is k by k. c c Pivoting is done between the diagonal blocks, with resulting c fill in, stored in G. c The blocks E,D,F,G are as returned from bl3dfacp. c************************************************************************ c The estimation is done using dlacon from Lapack. See c N.J. Higham, "FORTRAN codes for estimating the one-norm of c a real or complex matrix, with applications to condition estimation", c ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. c************************************************************************ c Input variables: integer n, k double precision E(k,k,n-1), D(k,k,n), F(k,k,n-1), G(k,k,n-2) integer pivot(k,n), isign(*) double precision est, v(*), work(*), anorm c Input: c k Integer, the size of the blocks. c n Integer, the number of blocks. c c The blocks E,D,F,G contain the elements of the matrix after c factoring using bl3dfacp. c E(k,k,n-1) Double precision, the sub-diagonal blocks. c D(k,k,n) Double precision, the diagonal blocks. c F(k,k,n-1) Double precision, the super-diagonal blocks. c G(k,k,n-2) Double precision, the fill in diagonal. c isign: integer(n*k), workspace. c v: double precision(n*k), v = inv(matrix).w, cond(matrix) = c norm(v)/norm(w). c work: double precision(n*k), workspace. c anorm: double precision, the norm of the unfactored matrix. c Output: c est: an estimate of the conditon number. c c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c ***** auxiliary programs ***** c dlacon: from Lapack, the norm estimator, see reference above. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc integer kase integer count, nk common /cndcnt/ count count = 0 nk = n*k c c Do the condition number estimation: c count = 0 kase = 0 55 call dlacon(nk,v,work,isign,est,kase) if (kase .ne. 0) then count = count+1 if ( kase .eq. 1 ) then call bl3dsolp('N', n, k, nk, E, D, F, G, pivot, 1, work) else if ( kase .eq. 2 ) then call bl3dsolp('T', n, k, nk, E, D, F, G, pivot, 1, work) endif goto 55 end if est = est*anorm return end