WriteSystemFloat.F
c**********************************************************************
#include "author.inc"
c* $Id: WriteSystemFloat.F,v 1.5 1995/08/30 05:48:36 turner Exp $
c*
c* Writes out entire linear system, Ax = b.
c*
c* <PARAMETER LIST>
c*
c* Input:
c* lu - logical unit to which to write
c* idim - leading dimension of array a
c* nrows - number of active rows in array a
c* ncols - number of active columns in array a
c* a - coefficient matrix
c* x - unknown vector
c* b - source vector
c* title - character description
c*
c* Output:
c* status - return status
c*
#include "copyright.inc"
c**********************************************************************
subroutine JT_WriteSystemFloat (lu, idim,
& nrows, ncols, a, x, b, title, status)
implicit none
c
c ... Input:
integer idim, lu, nrows, ncols
real a(idim,ncols), x(nrows), b(nrows)
character*(*) title
c
c ... Output:
integer status
c
c ... Local:
integer i, j
c
write(lu,*)
write(lu,*) title
write(lu,*)
if (ncols .le. 7) then
do i=1,nrows
write(lu,500) i, (a(i,j),j=1,ncols), x(i), b(i)
enddo
else
do j=1,ncols
write(lu,*)
write(lu,*) 'Coefficient, column: ',j
write(lu,*)
do i=1,nrows
write(lu,500) i, a(i,j)
enddo
enddo
write(lu,*)
write(lu,*) 'Unknown and Source vectors'
write(lu,*)
do i=1,nrows
write(lu,500) i, x(i), b(i)
enddo
endif
c
status = 0
return
c
500 format (t2, i7, 1p, 9(2x,e13.6))
end