1
C/MEMBR ADD NAME=SOLSY,SSI=0
2
subroutine solsy (wm, iwm, x, tem)
6
1 icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
7
2 maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
8
integer i, meband, ml, mu
9
double precision wm, x, tem
10
double precision rownd, rowns,
11
1 ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
12
double precision di, hl0, phl0, r
13
dimension wm(*), iwm(*), x(*), tem(*)
14
common /ls0001/ rownd, rowns(209),
15
2 ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
16
3 iownd(14), iowns(6),
17
4 icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
18
5 maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
19
c-----------------------------------------------------------------------
21
c this routine manages the solution of the linear system arising from
22
c a chord iteration. it is called if miter .ne. 0.
23
c if miter is 1 or 2, it calls dgesl to accomplish this.
24
c if miter = 3 it updates the coefficient h*el0 in the diagonal
25
c matrix, and then computes the solution.
26
c if miter is 4 or 5, it calls dgbsl.
28
c communication with solsy uses the following variables..
29
c wm = real work space containing the inverse diagonal matrix if
30
c miter = 3 and the lu decomposition of the matrix otherwise.
31
c storage of matrix elements starts at wm(3).
32
c wm also contains the following matrix-related data..
33
c wm(1) = sqrt(uround) (not used here),
34
c wm(2) = hl0, the previous value of h*el0, used if miter = 3.
35
c iwm = integer work space containing pivot information, starting at
36
c iwm(21), if miter is 1, 2, 4, or 5. iwm also contains band
37
c parameters ml = iwm(1) and mu = iwm(2) if miter is 4 or 5.
38
c x = the right-hand side vector on input, and the solution vector
39
c on output, of length n.
40
c tem = vector of work space of length n, not used in this version.
41
c iersl = output flag (in common). iersl = 0 if no trouble occurred.
42
c iersl = 1 if a singular matrix arose with miter = 3.
43
c this routine also uses the common variables el0, h, miter, and n.
45
c-----------------------------------------------------------------------
48
go to (100, 100, 300, 400, 400), miter
49
100 call dgesl (wm(3), n, n, iwm(21), x, 0)
55
if (hl0 .eq. phl0) go to 330
58
di = 1.0d+0 - r*(1.0d+0 - 1.0d+0/wm(i+2))
59
if (abs(di) .eq. 0.0d+0) go to 390
60
320 wm(i+2) = 1.0d+0/di
62
340 x(i) = wm(i+2)*x(i)
69
meband = 2*ml + mu + 1
70
call dgbsl (wm(3), meband, n, ml, mu, iwm(21), x, 0)
72
c----------------------- end of subroutine solsy -----------------------