44 rowMinMatrix, rowMaxMatrix, &
45 colMinMatrix, colMaxMatrix, &
46 rowMinPrint , rowMaxPrint, &
47 colMinPrint , colMaxPrint, &
54 integer,
intent (in) :: fileUnit
55 character (len
=*),
intent (in) :: title
56 integer,
intent (in) :: rowMinMatrix, rowMaxMatrix
57 integer,
intent (in) :: colMinMatrix, colMaxMatrix
58 integer,
intent (in) :: rowMinPrint , rowMaxPrint
59 integer,
intent (in) :: colMinPrint , colMaxPrint
60 real,
intent (in) :: matrix (rowMinMatrix : rowMaxMatrix , colMinMatrix : colMaxMatrix)
63 integer :: col, colBeg, colEnd
64 integer :: nColBlocks, nColTotal
67 integer,
parameter :: nColPerBlock
= 10
73 write (fileUnit,
'(/)')
74 write (fileUnit,
'(a)') title
75 write (fileUnit,
'(/)')
81 if (rowMaxPrint
> rowMaxMatrix
.or. rowMinPrint
< rowMinMatrix)
then
82 call Driver_abort(
"ut_printMatrix: Matrix row printing range out of bounds")
85 if (colMaxPrint
> colMaxMatrix
.or. colMinPrint
< colMinMatrix)
then
86 call Driver_abort(
"ut_printMatrix: Matrix column printing range out of bounds")
89 if (rowMinPrint
> rowMaxPrint
.or. colMinPrint
> colMaxPrint)
then
90 call Driver_abort(
"ut_printMatrix: No matrix printing range!")
97 nColTotal
= colMaxPrint
- colMinPrint
+ 1
98 nColBlocks
= nColTotal
/ nColPerBlock
104 colEnd
= colMinPrint
- 1
106 do block = 1,nColBlocks
109 colEnd
= colEnd
+ nColPerBlock
111 write (fileUnit,
'(/,1x,10i14)') (col , col
= colBeg , colEnd)
112 write (fileUnit,
'(/)')
114 do row
= rowMinPrint ,rowMaxPrint
115 write (fileUnit,
'(i6,10es14.6)') row, (matrix(row,col), col
= colBeg , colEnd)
126 if (colBeg
> colMaxPrint)
return
128 write (fileUnit,
'(/,1x,10i14)') (col , col
= colBeg , colMaxPrint)
129 write (fileUnit,
'(/)')
131 do row
= rowMinPrint ,rowMaxPrint
132 write (fileUnit,
'(i6,10es14.6)') row, (matrix(row,col), col
= colBeg , colMaxPrint)
subroutine ut_printMatrix(fileUnit, title, rowMinMatrix, rowMaxMatrix, colMinMatrix, colMaxMatrix, rowMinPrint, rowMaxPrint, colMinPrint, colMaxPrint, matrix)