gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
subfor.f
Go to the documentation of this file.
1  subroutine subfor ( w, ipivot, nrow, last, b, x )
2 
3 c*********************************************************************72
4 c
5 cc SUBFOR carries out the forward pass of substitution for the current block.
6 c
7 c carries out the forward pass of substitution for the current block,
8 c i.e., the action on the right side corresponding to the elimination
9 c carried out in f a c t r b for this block.
10 c at the end, x(j) contains the right side of the transformed
11 c ipivot(j)-th equation in this block, j=1,...,nrow. then, since
12 c for i=1,...,nrow-last, b(nrow+i) is going to be used as the right
13 c side of equation i in the next block (shifted over there from
14 c this block during factorization), it is set equal to x(last+i) here.
15 c
16 c parameters
17 c w, ipivot, nrow, last are as on return from factrb.
18 c b(j) is expected to contain, on input, the right side of j-th
19 c equation for this block, j=1,...,nrow.
20 c b(nrow+j) contains, on output, the appropriately modified right
21 c side for equation j in next block, j=1,...,nrow-last.
22 c x(j) contains, on output, the appropriately modified right
23 c side of equation ipivot(j) in this block, j=1,...,last (and
24 c even for j=last+1,...,nrow).
25 c
26  implicit none
27 
28  integer last
29  integer nrow
30 
31  integer ipivot(nrow), ip,j,jmax,k,lastp1,nrowml
32 c dimension b(nrow + nrow-last)
33  double precision w(nrow,last),b(1),sum,x(nrow)
34  ip = ipivot(1)
35  x(1) = b(ip)
36  if (nrow .eq. 1) go to 99
37  do 15 k=2,nrow
38  ip = ipivot(k)
39  jmax = amin0(k-1,last)
40  sum = 0.0d+00
41  do 14 j=1,jmax
42  14 sum = w(ip,j)*x(j) + sum
43  15 x(k) = b(ip) - sum
44 c
45 c transfer modified right sides of equations ipivot(last+1),...,
46 c ipivot(nrow) to next block.
47  nrowml = nrow - last
48  if (nrowml .eq. 0) go to 99
49  lastp1 = last+1
50  do 25 k=lastp1,nrow
51  25 b(nrowml+k) = x(k)
52  99 return
53  end
subroutine subfor(w, ipivot, nrow, last, b, x)
Definition: subfor.f:2
gtkIOStream: /tmp/gtkiostream/src/deBoor/subfor.f Source File
GTK+ IOStream  Beta