31 NEQ, NJA, NIAPC, NJAPC, &
32 IPC, ICNVGOPT, NORTH, &
33 DVCLOSE, RCLOSE, L2NORM0, EPFACT, &
34 IA0, JA0, A0, IAPC, JAPC, APC, &
37 NCONV, CONVNMOD, CONVMODSTART, &
40 integer(I4B),
INTENT(INOUT) :: ICNVG
41 integer(I4B),
INTENT(IN) :: ITMAX
42 integer(I4B),
INTENT(INOUT) :: INNERIT
43 integer(I4B),
INTENT(IN) :: NEQ
44 integer(I4B),
INTENT(IN) :: NJA
45 integer(I4B),
INTENT(IN) :: NIAPC
46 integer(I4B),
INTENT(IN) :: NJAPC
47 integer(I4B),
INTENT(IN) :: IPC
48 integer(I4B),
INTENT(IN) :: ICNVGOPT
49 integer(I4B),
INTENT(IN) :: NORTH
50 real(DP),
INTENT(IN) :: DVCLOSE
51 real(DP),
INTENT(IN) :: RCLOSE
52 real(DP),
INTENT(IN) :: L2NORM0
53 real(DP),
INTENT(IN) :: EPFACT
54 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA0
55 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA0
56 real(DP),
DIMENSION(NJA),
INTENT(IN) :: A0
57 integer(I4B),
DIMENSION(NIAPC + 1),
INTENT(IN) :: IAPC
58 integer(I4B),
DIMENSION(NJAPC),
INTENT(IN) :: JAPC
59 real(DP),
DIMENSION(NJAPC),
INTENT(IN) :: APC
60 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: X
61 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: B
62 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: D
63 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: P
64 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: Q
65 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: Z
67 integer(I4B),
INTENT(IN) :: NJLU
68 integer(I4B),
DIMENSION(NIAPC),
INTENT(IN) :: IW
69 integer(I4B),
DIMENSION(NJLU),
INTENT(IN) :: JLU
71 integer(I4B),
INTENT(IN) :: NCONV
72 integer(I4B),
INTENT(IN) :: CONVNMOD
73 integer(I4B),
DIMENSION(CONVNMOD + 1),
INTENT(INOUT) :: CONVMODSTART
74 character(len=31),
DIMENSION(NCONV),
INTENT(INOUT) :: CACCEL
79 character(len=31) :: cval
82 integer(I4B) :: xloc, rloc
83 integer(I4B) :: im, im0, im1
90 real(DP) :: denominator
91 real(DP) :: alpha, beta
100 inner:
DO iiter = 1, itmax
101 innerit = innerit + 1
102 summary%iter_cnt = summary%iter_cnt + 1
113 CALL lusol(neq, d, z, apc, jlu, iw)
115 rho = ddot(neq, d, 1, z, 1)
125 p(n) = z(n) + beta * p(n)
132 call amux(neq, p, q, a0, ja0, ia0)
133 denominator = ddot(neq, p, 1, q, 1)
134 denominator = denominator + sign(
dprec, denominator)
135 alpha = rho / denominator
142 summary%locdv(im) = 0
143 summary%dvmax(im) =
dzero
145 summary%rmax(im) =
dzero
148 im0 = convmodstart(1)
149 im1 = convmodstart(2)
155 im0 = convmodstart(im)
156 im1 = convmodstart(im + 1)
162 IF (abs(tv) > abs(deltax))
THEN
166 IF (abs(tv) > abs(summary%dvmax(im)))
THEN
167 summary%dvmax(im) = tv
168 summary%locdv(im) = n
171 tv = tv - alpha * q(n)
173 IF (abs(tv) > abs(rmax))
THEN
177 IF (abs(tv) > abs(summary%rmax(im)))
THEN
178 summary%rmax(im) = tv
181 l2norm = l2norm + tv * tv
183 l2norm = sqrt(l2norm)
188 WRITE (cval,
'(g15.7)') alpha
190 summary%itinner(n) = iiter
192 summary%convlocdv(im, n) = summary%locdv(im)
193 summary%convlocr(im, n) = summary%locr(im)
194 summary%convdvmax(im, n) = summary%dvmax(im)
195 summary%convrmax(im, n) = summary%rmax(im)
200 IF (icnvgopt == 2 .OR. icnvgopt == 3 .OR. icnvgopt == 4)
THEN
207 l2norm0, epfact, dvclose, rclose)
210 IF (rcnvg ==
dzero) icnvg = 1
213 IF (icnvg .NE. 0)
EXIT inner
223 lorth = mod(iiter + 1, north) == 0
230 if (rho ==
dzero)
then
239 IF (icnvg < 0) icnvg = 0
250 NEQ, NJA, NIAPC, NJAPC, &
251 IPC, ICNVGOPT, NORTH, ISCL, DSCALE, &
252 DVCLOSE, RCLOSE, L2NORM0, EPFACT, &
253 IA0, JA0, A0, IAPC, JAPC, APC, &
255 T, V, DHAT, PHAT, QHAT, &
257 NCONV, CONVNMOD, CONVMODSTART, &
260 integer(I4B),
INTENT(INOUT) :: ICNVG
261 integer(I4B),
INTENT(IN) :: ITMAX
262 integer(I4B),
INTENT(INOUT) :: INNERIT
263 integer(I4B),
INTENT(IN) :: NEQ
264 integer(I4B),
INTENT(IN) :: NJA
265 integer(I4B),
INTENT(IN) :: NIAPC
266 integer(I4B),
INTENT(IN) :: NJAPC
267 integer(I4B),
INTENT(IN) :: IPC
268 integer(I4B),
INTENT(IN) :: ICNVGOPT
269 integer(I4B),
INTENT(IN) :: NORTH
270 integer(I4B),
INTENT(IN) :: ISCL
271 real(DP),
DIMENSION(NEQ),
INTENT(IN) :: DSCALE
272 real(DP),
INTENT(IN) :: DVCLOSE
273 real(DP),
INTENT(IN) :: RCLOSE
274 real(DP),
INTENT(IN) :: L2NORM0
275 real(DP),
INTENT(IN) :: EPFACT
276 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA0
277 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA0
278 real(DP),
DIMENSION(NJA),
INTENT(IN) :: A0
279 integer(I4B),
DIMENSION(NIAPC + 1),
INTENT(IN) :: IAPC
280 integer(I4B),
DIMENSION(NJAPC),
INTENT(IN) :: JAPC
281 real(DP),
DIMENSION(NJAPC),
INTENT(IN) :: APC
282 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: X
283 real(DP),
DIMENSION(NEQ),
INTENT(IN) :: B
284 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: D
285 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: P
286 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: Q
287 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: T
288 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: V
289 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: DHAT
290 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: PHAT
291 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: QHAT
293 integer(I4B),
INTENT(IN) :: NJLU
294 integer(I4B),
DIMENSION(NIAPC),
INTENT(IN) :: IW
295 integer(I4B),
DIMENSION(NJLU),
INTENT(IN) :: JLU
297 integer(I4B),
INTENT(IN) :: NCONV
298 integer(I4B),
INTENT(IN) :: CONVNMOD
299 integer(I4B),
DIMENSION(CONVNMOD + 1),
INTENT(INOUT) :: CONVMODSTART
300 character(len=31),
DIMENSION(NCONV),
INTENT(INOUT) :: CACCEL
305 character(len=15) :: cval1, cval2
307 integer(I4B) :: iiter
308 integer(I4B) :: xloc, rloc
309 integer(I4B) :: im, im0, im1
316 real(DP) :: alpha, alpha0
318 real(DP) :: rho, rho0
319 real(DP) :: omega, omega0
320 real(DP) :: numerator, denominator
338 inner:
DO iiter = 1, itmax
339 innerit = innerit + 1
340 summary%iter_cnt = summary%iter_cnt + 1
343 rho = ddot(neq, dhat, 1, d, 1)
351 beta = (rho / rho0) * (alpha0 / omega0)
353 p(n) = d(n) + beta * (p(n) - omega0 * v(n))
366 CALL lusol(neq, p, phat, apc, jlu, iw)
372 call amux(neq, phat, v, a0, ja0, ia0)
375 denominator = ddot(neq, dhat, 1, v, 1)
376 denominator = denominator + sign(
dprec, denominator)
377 alpha = rho / denominator
381 q(n) = d(n) - alpha * v(n)
417 CALL lusol(neq, q, qhat, apc, jlu, iw)
421 call amux(neq, qhat, t, a0, ja0, ia0)
424 numerator = ddot(neq, t, 1, q, 1)
425 denominator = ddot(neq, t, 1, t, 1)
426 denominator = denominator + sign(
dprec, denominator)
427 omega = numerator / denominator
434 summary%dvmax(im) =
dzero
435 summary%rmax(im) =
dzero
438 im0 = convmodstart(1)
439 im1 = convmodstart(2)
445 im0 = convmodstart(im)
446 im1 = convmodstart(im + 1)
450 tv = alpha * phat(n) + omega * qhat(n)
452 IF (iscl .NE. 0)
THEN
455 IF (abs(tv) > abs(deltax))
THEN
459 IF (abs(tv) > abs(summary%dvmax(im)))
THEN
460 summary%dvmax(im) = tv
461 summary%locdv(im) = n
465 tv = q(n) - omega * t(n)
467 IF (iscl .NE. 0)
THEN
470 IF (abs(tv) > abs(rmax))
THEN
474 IF (abs(tv) > abs(summary%rmax(im)))
THEN
475 summary%rmax(im) = tv
478 l2norm = l2norm + tv * tv
480 l2norm = sqrt(l2norm)
485 WRITE (cval1,
'(g15.7)') alpha
486 WRITE (cval2,
'(g15.7)') omega
487 caccel(n) = trim(adjustl(cval1))//
','//trim(adjustl(cval2))
488 summary%itinner(n) = iiter
490 summary%convdvmax(im, n) = summary%dvmax(im)
491 summary%convlocdv(im, n) = summary%locdv(im)
492 summary%convrmax(im, n) = summary%rmax(im)
493 summary%convlocr(im, n) = summary%locr(im)
498 IF (icnvgopt == 2 .OR. icnvgopt == 3 .OR. icnvgopt == 4)
THEN
505 l2norm0, epfact, dvclose, rclose)
508 IF (rcnvg ==
dzero) icnvg = 1
511 IF (icnvg .NE. 0)
EXIT inner
530 lorth = mod(iiter + 1, north) == 0
537 if (rho * omega ==
dzero)
then
548 IF (icnvg < 0) icnvg = 0
560 integer(I4B),
INTENT(IN) :: IORD
561 integer(I4B),
INTENT(IN) :: NEQ
562 integer(I4B),
INTENT(IN) :: NJA
563 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA
564 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA
565 integer(I4B),
DIMENSION(NEQ),
INTENT(INOUT) :: LORDER
566 integer(I4B),
DIMENSION(NEQ),
INTENT(INOUT) :: IORDER
568 character(len=LINELENGTH) :: errmsg
571 integer(I4B),
DIMENSION(:),
ALLOCATABLE :: iwork0
572 integer(I4B),
DIMENSION(:),
ALLOCATABLE :: iwork1
573 integer(I4B) :: iflag
583 CALL genrcm(neq, nja, ia, ja, lorder)
585 nsp = 3 * neq + 4 * nja
586 allocate (iwork0(neq))
587 allocate (iwork1(nsp))
588 CALL ims_odrv(neq, nja, nsp, ia, ja, lorder, iwork0, &
590 IF (iflag .NE. 0)
THEN
591 write (errmsg,
'(A,1X,A)') &
592 'IMSLINEARSUB_CALC_ORDER error creating minimum degree ', &
598 deallocate (iwork0, iwork1)
603 iorder(lorder(n)) = n
608 call parser%StoreErrorUnit()
622 integer(I4B),
INTENT(IN) :: IOPT
623 integer(I4B),
INTENT(IN) :: ISCL
624 integer(I4B),
INTENT(IN) :: NEQ
625 integer(I4B),
INTENT(IN) :: NJA
626 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA
627 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA
628 real(DP),
DIMENSION(NJA),
INTENT(INOUT) :: AMAT
629 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: X
630 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: B
631 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: DSCALE
632 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: DSCALE2
635 integer(I4B) :: id, jc
636 integer(I4B) :: i0, i1
637 real(DP) :: v, c1, c2
648 c1 =
done / sqrt(abs(v))
661 amat(i) = c1 * amat(i) * c2
674 c1 = c1 + amat(i) * amat(i)
677 IF (c1 ==
dzero)
THEN
686 amat(i) = c1 * amat(i)
701 dscale2(jc) = dscale2(jc) + c2 * c2
706 IF (c2 ==
dzero)
THEN
721 amat(i) = c2 * amat(i)
745 amat(i) = (
done / c1) * amat(i) * (
done / c2)
762 AMAT, IA, JA, APC, IAPC, JAPC, IW, W, &
763 LEVEL, DROPTOL, NJLU, NJW, NWLU, JLU, JW, WLU)
767 integer(I4B),
INTENT(IN) :: IOUT
768 integer(I4B),
INTENT(IN) :: NJA
769 integer(I4B),
INTENT(IN) :: NEQ
770 integer(I4B),
INTENT(IN) :: NIAPC
771 integer(I4B),
INTENT(IN) :: NJAPC
772 integer(I4B),
INTENT(IN) :: IPC
773 real(DP),
INTENT(IN) :: RELAX
774 real(DP),
DIMENSION(NJA),
INTENT(IN) :: AMAT
775 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA
776 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA
777 real(DP),
DIMENSION(NJAPC),
INTENT(INOUT) :: APC
778 integer(I4B),
DIMENSION(NIAPC + 1),
INTENT(INOUT) :: IAPC
779 integer(I4B),
DIMENSION(NJAPC),
INTENT(INOUT) :: JAPC
780 integer(I4B),
DIMENSION(NIAPC),
INTENT(INOUT) :: IW
781 real(DP),
DIMENSION(NIAPC),
INTENT(INOUT) :: W
783 integer(I4B),
INTENT(IN) :: LEVEL
784 real(DP),
INTENT(IN) :: DROPTOL
785 integer(I4B),
INTENT(IN) :: NJLU
786 integer(I4B),
INTENT(IN) :: NJW
787 integer(I4B),
INTENT(IN) :: NWLU
788 integer(I4B),
DIMENSION(NJLU),
INTENT(INOUT) :: JLU
789 integer(I4B),
DIMENSION(NJW),
INTENT(INOUT) :: JW
790 real(DP),
DIMENSION(NWLU),
INTENT(INOUT) :: WLU
792 character(len=LINELENGTH) :: errmsg
793 character(len=100),
dimension(5),
parameter :: cerr = &
794 [
"Elimination process has generated a row in L or U whose length is > n.", &
795 &
"The matrix L overflows the array al. ", &
796 &
"The matrix U overflows the array alu. ", &
797 &
"Illegal value for lfil. ", &
798 &
"Zero row encountered. "]
799 integer(i4b) :: ipcflag
800 integer(I4B) :: icount
804 2000
FORMAT(/,
' MATRIX IS SEVERELY NON-DIAGONALLY DOMINANT.', &
805 /,
' ADDED SMALL VALUE TO PIVOT ', i0,
' TIMES IN', &
806 ' IMSLINEARSUB_PCU.')
818 apc, iapc, japc, iw, w, &
819 relax, ipcflag, delta)
824 CALL ilut(neq, amat, ja, ia, level, droptol, &
825 apc, jlu, iw, njapc, wlu, jw, ierr, &
826 relax, ipcflag, delta)
829 write (errmsg,
'(a,1x,i0,1x,a)') &
830 'ILUT: zero pivot encountered at step number', ierr,
'.'
832 write (errmsg,
'(a,1x,a)')
'ILUT:', cerr(-ierr)
835 call parser%StoreErrorUnit()
842 IF (ipcflag < 1)
THEN
845 delta = 1.5d0 * delta +
dem3
847 IF (delta >
dhalf)
THEN
854 if (icount > 10)
then
862 write (iout, 2000) icount
874 integer(I4B),
INTENT(IN) :: NJA
875 integer(I4B),
INTENT(IN) :: NEQ
876 real(DP),
DIMENSION(NJA),
INTENT(IN) :: AMAT
877 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: APC
878 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA
879 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA
882 integer(I4B) :: ic0, ic1
909 integer(I4B),
INTENT(IN) :: NEQ
910 real(DP),
DIMENSION(NEQ),
INTENT(IN) :: A
911 real(DP),
DIMENSION(NEQ),
INTENT(IN) :: D1
912 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: D2
929 APC, IAPC, JAPC, IW, W, &
930 RELAX, IPCFLAG, DELTA)
932 integer(I4B),
INTENT(IN) :: NJA
933 integer(I4B),
INTENT(IN) :: NEQ
934 real(DP),
DIMENSION(NJA),
INTENT(IN) :: AMAT
935 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA
936 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA
937 real(DP),
DIMENSION(NJA),
INTENT(INOUT) :: APC
938 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(INOUT) :: IAPC
939 integer(I4B),
DIMENSION(NJA),
INTENT(INOUT) :: JAPC
940 integer(I4B),
DIMENSION(NEQ),
INTENT(INOUT) :: IW
941 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: W
942 real(DP),
INTENT(IN) :: RELAX
943 integer(I4B),
INTENT(INOUT) :: IPCFLAG
944 real(DP),
INTENT(IN) :: DELTA
946 integer(I4B) :: ic0, ic1
947 integer(I4B) :: iic0, iic1
948 integer(I4B) :: iu, iiu
951 integer(I4B) :: jcol, jw
952 integer(I4B) :: jjcol
971 w(jcol) = w(jcol) + amat(j)
974 ic1 = iapc(n + 1) - 1
977 lower:
DO j = ic0, iu - 1
980 iic1 = iapc(jcol + 1) - 1
982 tl = w(jcol) * apc(jcol)
988 w(jjcol) = w(jjcol) - tl * apc(jj)
990 rs = rs + tl * apc(jj)
997 tl = (
done + delta) * d - (drelax * rs)
1001 IF (sd1 .NE. d)
THEN
1005 IF (ipcflag > 1)
THEN
1014 IF (abs(tl) ==
dzero)
THEN
1018 IF (ipcflag > 1)
THEN
1051 integer(I4B),
INTENT(IN) :: NJA
1052 integer(I4B),
INTENT(IN) :: NEQ
1053 real(DP),
DIMENSION(NJA),
INTENT(IN) :: APC
1054 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IAPC
1055 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JAPC
1056 real(DP),
DIMENSION(NEQ),
INTENT(IN) :: R
1057 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: D
1059 integer(I4B) :: ic0, ic1
1061 integer(I4B) :: jcol
1062 integer(I4B) :: j, n
1066 forward:
DO n = 1, neq
1069 ic1 = iapc(n + 1) - 1
1071 lower:
DO j = ic0, iu
1073 tv = tv - apc(j) * d(jcol)
1079 backward:
DO n = neq, 1, -1
1081 ic1 = iapc(n + 1) - 1
1084 upper:
DO j = iu, ic1
1086 tv = tv - apc(j) * d(jcol)
1103 Rmax0, Epfact, Dvclose, Rclose)
1105 integer(I4B),
INTENT(IN) :: Icnvgopt
1106 integer(I4B),
INTENT(INOUT) :: Icnvg
1107 integer(I4B),
INTENT(IN) :: Iiter
1108 real(DP),
INTENT(IN) :: Dvmax
1109 real(DP),
INTENT(IN) :: Rmax
1110 real(DP),
INTENT(IN) :: Rmax0
1111 real(DP),
INTENT(IN) :: Epfact
1112 real(DP),
INTENT(IN) :: Dvclose
1113 real(DP),
INTENT(IN) :: Rclose
1115 IF (icnvgopt == 0)
THEN
1116 IF (abs(dvmax) <= dvclose .AND. abs(rmax) <= rclose)
THEN
1119 ELSE IF (icnvgopt == 1)
THEN
1120 IF (abs(dvmax) <= dvclose .AND. abs(rmax) <= rclose)
THEN
1121 IF (iiter == 1)
THEN
1127 ELSE IF (icnvgopt == 2)
THEN
1128 IF (abs(dvmax) <= dvclose .OR. rmax <= rclose)
THEN
1130 ELSE IF (rmax <= rmax0 * epfact)
THEN
1133 ELSE IF (icnvgopt == 3)
THEN
1134 IF (abs(dvmax) <= dvclose)
THEN
1136 ELSE IF (rmax <= rmax0 * rclose)
THEN
1139 ELSE IF (icnvgopt == 4)
THEN
1140 IF (abs(dvmax) <= dvclose .AND. rmax <= rclose)
THEN
1142 ELSE IF (rmax <= rmax0 * epfact)
THEN
1149 niapc, njapc, njlu, njw, nwlu)
1150 integer(I4B),
intent(in) :: neq
1151 integer(I4B),
intent(in) :: nja
1152 integer(I4B),
dimension(:),
intent(in) :: ia
1153 integer(I4B),
intent(in) :: level
1154 integer(I4B),
intent(in) :: ipc
1155 integer(I4B),
intent(inout) :: niapc
1156 integer(I4B),
intent(inout) :: njapc
1157 integer(I4B),
intent(inout) :: njlu
1158 integer(I4B),
intent(inout) :: njw
1159 integer(I4B),
intent(inout) :: nwlu
1161 integer(I4B) :: n, i
1162 integer(I4B) :: ijlu, ijw, iwlu, iwk
1173 if (ipc == 3 .or. ipc == 4)
then
1176 iwk = neq * (level * 2 + 1)
1180 i = ia(n + 1) - ia(n)
1210 integer(I4B),
INTENT(IN) :: NEQ
1211 integer(I4B),
INTENT(IN) :: NJA
1212 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA
1213 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA
1214 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(INOUT) :: IAPC
1215 integer(I4B),
DIMENSION(NJA),
INTENT(INOUT) :: JAPC
1217 integer(I4B) :: n, j
1218 integer(I4B) :: i0, i1
1219 integer(I4B) :: nlen
1220 integer(I4B) :: ic, ip
1221 integer(I4B) :: jcol
1222 integer(I4B),
DIMENSION(:),
ALLOCATABLE :: iarr
1229 ALLOCATE (iarr(nlen))
1233 IF (jcol == n) cycle
1246 iapc(neq + 1) = nja + 1
1251 i1 = iapc(n + 1) - 1
1252 japc(n) = iapc(n + 1)
1270 integer(I4B),
INTENT(IN) :: NVAL
1271 integer(I4B),
DIMENSION(NVAL),
INTENT(INOUT) :: IARRAY
1273 integer(I4B) :: i, j, itemp
1277 if (iarray(i) > iarray(j))
then
1279 iarray(j) = iarray(i)
1293 integer(I4B),
INTENT(IN) :: NEQ
1294 integer(I4B),
INTENT(IN) :: NJA
1295 real(DP),
DIMENSION(NEQ),
INTENT(IN) :: X
1296 real(DP),
DIMENSION(NEQ),
INTENT(IN) :: B
1297 real(DP),
DIMENSION(NEQ),
INTENT(INOUT) :: D
1298 real(DP),
DIMENSION(NJA),
INTENT(IN) :: A
1299 integer(I4B),
DIMENSION(NEQ + 1),
INTENT(IN) :: IA
1300 integer(I4B),
DIMENSION(NJA),
INTENT(IN) :: JA
1306 call amux(neq, x, d, a, ja, ia)
1317 integer(I4B) :: icnvgopt
1318 integer(I4B) :: kstp
1321 if (icnvgopt == 2)
then
1327 else if (icnvgopt == 4)
then
subroutine ilut(n, a, ja, ia, lfil, droptol, alu, jlu, ju, iwk, w, jw, ierr, relax, izero, delta)
subroutine lusol(n, y, x, alu, jlu, ju)
This module contains block parser methods.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
real(dp), parameter dhalf
real constant 1/2
real(dp), parameter dem3
real constant 1e-3
integer(i4b), parameter izero
integer constant zero
real(dp), parameter dem4
real constant 1e-4
real(dp), parameter dem6
real constant 1e-6
real(dp), parameter dzero
real constant zero
real(dp), parameter dprec
real constant machine precision
real(dp), parameter done
real constant 1
This module contains the IMS linear accelerator subroutines.
subroutine ims_base_pcu(IOUT, NJA, NEQ, NIAPC, NJAPC, IPC, RELAX, AMAT, IA, JA, APC, IAPC, JAPC, IW, W, LEVEL, DROPTOL, NJLU, NJW, NWLU, JLU, JW, WLU)
@ brief Update the preconditioner
subroutine ims_base_cg(ICNVG, ITMAX, INNERIT, NEQ, NJA, NIAPC, NJAPC, IPC, ICNVGOPT, NORTH, DVCLOSE, RCLOSE, L2NORM0, EPFACT, IA0, JA0, A0, IAPC, JAPC, APC, X, B, D, P, Q, Z, NJLU, IW, JLU, NCONV, CONVNMOD, CONVMODSTART, CACCEL, summary)
@ brief Preconditioned Conjugate Gradient linear accelerator
subroutine ims_base_pccrs(NEQ, NJA, IA, JA, IAPC, JAPC)
@ brief Generate CRS pointers for the preconditioner
subroutine ims_base_isort(NVAL, IARRAY)
In-place sorting for an integer array.
subroutine ims_base_bcgs(ICNVG, ITMAX, INNERIT, NEQ, NJA, NIAPC, NJAPC, IPC, ICNVGOPT, NORTH, ISCL, DSCALE, DVCLOSE, RCLOSE, L2NORM0, EPFACT, IA0, JA0, A0, IAPC, JAPC, APC, X, B, D, P, Q, T, V, DHAT, PHAT, QHAT, NJLU, IW, JLU, NCONV, CONVNMOD, CONVMODSTART, CACCEL, summary)
@ brief Preconditioned BiConjugate Gradient Stabilized linear accelerator
subroutine ims_calc_pcdims(neq, nja, ia, level, ipc, niapc, njapc, njlu, njw, nwlu)
subroutine ims_base_scale(IOPT, ISCL, NEQ, NJA, IA, JA, AMAT, X, B, DSCALE, DSCALE2)
@ brief Scale the coefficient matrix
subroutine ims_base_testcnvg(Icnvgopt, Icnvg, Iiter, Dvmax, Rmax, Rmax0, Epfact, Dvclose, Rclose)
@ brief Test for solver convergence
real(dp) function ims_base_epfact(icnvgopt, kstp)
Function returning EPFACT.
subroutine ims_base_ilu0a(NJA, NEQ, APC, IAPC, JAPC, R, D)
@ brief Apply the ILU0 and MILU0 preconditioners
subroutine ims_base_pcjac(NJA, NEQ, AMAT, APC, IA, JA)
@ brief Jacobi preconditioner
subroutine ims_base_calc_order(IORD, NEQ, NJA, IA, JA, LORDER, IORDER)
@ brief Calculate LORDER AND IORDER
subroutine ims_base_residual(NEQ, NJA, X, B, D, A, IA, JA)
Calculate residual.
subroutine ims_base_pcilu0(NJA, NEQ, AMAT, IA, JA, APC, IAPC, JAPC, IW, W, RELAX, IPCFLAG, DELTA)
@ brief Update the ILU0 preconditioner
type(blockparsertype), private parser
subroutine ims_base_jaca(NEQ, A, D1, D2)
@ brief Apply the Jacobi preconditioner
subroutine, public ims_odrv(n, nja, nsp, ia, ja, p, ip, isp, flag)
This module defines variable data types.
pure logical function, public is_close(a, b, rtol, atol, symmetric)
Check if a real value is approximately equal to another.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine genrcm(node_num, adj_num, adj_row, adj, perm)
subroutine amux(n, x, y, a, ja, ia)
This structure stores the generic convergence info for a solution.